package com.fr.report.core.cal;

import [I;
import com.fr.base.ArrayUtils;
import com.fr.base.ColumnRow;
import com.fr.base.FCloneable;
import com.fr.base.FRContext;
import com.fr.base.Inter;
import com.fr.base.StringUtils;
import com.fr.base.core.BaseCoreUtils;
import com.fr.base.core.ComparatorUtils;
import com.fr.base.core.FRCoreContext;
import com.fr.base.core.RSADecode;
import com.fr.base.core.SimpleKV;
import com.fr.base.core.json.JSONObject;
import com.fr.base.core.list.IntList;
import com.fr.base.core.util.ListSet;
import com.fr.base.core.util.vt.VT4FR;
import com.fr.base.core.util.vt.VT4FR.FUNC;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.chart.Chart;
import com.fr.chart.ChartCollection;
import com.fr.chart.ChartPainter;
import com.fr.chart.Title;
import com.fr.chart.axis.Axis;
import com.fr.chart.axis.ValueAxis;
import com.fr.chart.core.ChartUtils;
import com.fr.chart.plot.CategoryPlot;
import com.fr.chart.plot.Plot;
import com.fr.chart.plot.RadarPlot;
import com.fr.chart.plot.RangePlot;
import com.fr.chart.plot.StockPlot;
import com.fr.chart.plot.XYScatterPlot;
import com.fr.data.ChartData;
import com.fr.data.ChartDataModel;
import com.fr.data.TableData;
import com.fr.data.TableDataException;
import com.fr.data.condition.Condition;
import com.fr.data.condition.LiteConditionUtils;
import com.fr.data.core.DataUtils;
import com.fr.data.core.define.ChartDataDefinition;
import com.fr.data.core.define.ReportDataDefinition;
import com.fr.data.core.define.ReportDataDefinition.SeriesEntry;
import com.fr.data.core.define.TableDataDefinition;
import com.fr.data.impl.NameTableData;
import com.fr.data.impl.ReportChartData;
import com.fr.data.impl.RowsTableData;
import com.fr.data.impl.TopChartData;
import com.fr.data.util.function.CurrentContextDataSetFunction;
import com.fr.data.util.function.DataSetFunction;
import com.fr.report.AbstractCellElement;
import com.fr.report.Cell;
import com.fr.report.CellCase;
import com.fr.report.DefaultCellCase;
import com.fr.report.DefaultCellElement;
import com.fr.report.FloatElement;
import com.fr.report.PageSet;
import com.fr.report.PaperSetting;
import com.fr.report.RWorkSheet;
import com.fr.report.Report;
import com.fr.report.ReportHF;
import com.fr.report.ReportSettings;
import com.fr.report.ReportWriteAttr;
import com.fr.report.ResultReport;
import com.fr.report.TableDataSource;
import com.fr.report.TemplateWorkBook;
import com.fr.report.WorkSheet;
import com.fr.report.WorkSheetAttr;
import com.fr.report.cellElement.CellExpandAttr;
import com.fr.report.cellElement.CellGUIAttr;
import com.fr.report.cellElement.CellInsertPolicyAttr;
import com.fr.report.cellElement.Formula;
import com.fr.report.cellElement.FormulaPresent;
import com.fr.report.cellElement.Present;
import com.fr.report.cellElement.TableDataColumn;
import com.fr.report.cellElement.core.CellElementAttribute;
import com.fr.report.cellElement.core.ConditionGroup;
import com.fr.report.cellElement.core.CustomGrouper;
import com.fr.report.cellElement.core.DSColumn;
import com.fr.report.cellElement.core.EM;
import com.fr.report.cellElement.core.Group;
import com.fr.report.cellElement.core.SubReport;
import com.fr.report.core.AnDSColumn;
import com.fr.report.core.DeathCycleException;
import com.fr.report.core.FormException;
import com.fr.report.core.FormReport.Action;
import com.fr.report.core.KV;
import com.fr.report.core.PackedReport;
import com.fr.report.core.PaginateReport;
import com.fr.report.core.ReportHelper;
import com.fr.report.core.ReportUtils;
import com.fr.report.core.ScriptUtils;
import com.fr.report.core.SheetUtils;
import com.fr.report.core.headerfooter.FormulaHFElement;
import com.fr.report.core.headerfooter.HFElement;
import com.fr.report.core.headerfooter.ImageHFElement;
import com.fr.report.highlight.AbstractHighlight;
import com.fr.report.highlight.Highlight;
import com.fr.report.highlight.HighlightGroup;
import com.fr.report.js.NameJavaScriptGroup;
import com.fr.report.painter.BiasTextPainter;
import com.fr.report.parameter.Parameter;
import com.fr.report.script.AbstractNameSpace;
import com.fr.report.script.Calculator;
import com.fr.report.script.CalculatorNameSpace;
import com.fr.report.script.Function;
import com.fr.report.script.ParameterMapNameSpace;
import com.fr.report.script.Primitive;
import com.fr.report.script.SheetInterval4CheckNameSpace;
import com.fr.report.script.SingleRowNameSpace;
import com.fr.report.script.core.ExTool;
import com.fr.report.script.core.FArray;
import com.fr.report.script.core.parser.CRAddress;
import com.fr.report.script.core.parser.ColumnRowLiteral;
import com.fr.report.script.core.parser.ColumnRowLocation;
import com.fr.report.script.core.parser.ColumnRowRange;
import com.fr.report.script.core.parser.ConditionalOrExpression;
import com.fr.report.script.core.parser.DatasetFunctionCall;
import com.fr.report.script.core.parser.LocationDim;
import com.fr.report.script.core.parser.UtilEvalError;
import com.fr.report.web.ui.FieldEditor;
import com.fr.report.web.ui.Widget;
import com.fr.report.web.ui.impl.write.AppendRowButton;
import com.fr.report.web.ui.impl.write.DeleteRowButton;
import com.fr.report.write.ValueVerifier;
import com.fr.util.Consts;
import java.awt.Image;
import java.awt.Point;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

public final class SE extends SheetExecuter
{
  private WorkSheet report;
  private int rowCount;
  private int columnCount;
  private int row_count_with_floatelem;
  private int col_count_with_floatelem;
  private FamilyMember[][] genealogy;
  private BEB[][] be_beb_2D;
  private boolean[][] states;
  private Box2DCase boxCase;
  private List executing_columnrow_list = new ArrayList();
  private static boolean advancedAnalysis = true;
  private SEDataSetFunction ds_function = null;
  private java.util.Map new_ds_map = new HashMap();
  private static final String new_ds_identifier = "_$_";
  private ExTool ex_tool = new ExTool(this)
  {
    private final SE this$0;

    public String ex()
    {
      SE.BoxCE[] arrayOfBoxCE = SE.access$000(this.this$0, paramColumnRowRange);
      ArrayList localArrayList = new ArrayList();
      for (int i = 0; i < arrayOfBoxCE.length; ++i)
      {
        SE.BoxCE localBoxCE1 = arrayOfBoxCE[i];
        if ((localBoxCE1 != null) && (!(localArrayList.contains(localBoxCE1))))
          localArrayList.add(localBoxCE1);
      }
      StringBuffer localStringBuffer = new StringBuffer();
      int j = 0;
      int k = localArrayList.size();
      while (j < k)
      {
        SE.BoxCE localBoxCE2 = (SE.BoxCE)localArrayList.get(j);
        localStringBuffer.append(ColumnRow.valueOf(localBoxCE2.col, localBoxCE2.row));
        if (j != k - 1)
          localStringBuffer.append(',');
        ++j;
      }
      return localStringBuffer.toString();
    }
  };
  private static final Object CUR_SE;
  private static final Object PE_CC_LIST;
  private static final Object BE_CC_SET;
  private static final Object BE_CC_ROWS_MAP;

  public SE(WorkSheet paramWorkSheet, java.util.Map paramMap)
  {
    this.report = paramWorkSheet;
    this.parameterMap = paramMap;
    this.calculator = Calculator.createStaticCalculator();
    this.calculator.setCurrentReport(paramWorkSheet);
    this.calculator.setCurrentTableDataSource(paramWorkSheet.getTemplateWorkBook());
    this.calculator.setAttribute(CUR_SE, this);
    this.calculator.setAttribute(BE_CC_SET, new HashSet());
    this.calculator.setAttribute(PE_CC_LIST, new LinkedList());
    this.calculator.setAttribute(BE_CC_ROWS_MAP, new HashMap());
    this.calculator.setAttribute(CurrentContextDataSetFunction.CUR_DSNAME, new LinkedList());
    if (paramWorkSheet.getTemplateWorkBook() != null)
    {
      Iterator localIterator = this.report.getTemplateWorkBook().getTableDataNameIterator();
      while (localIterator.hasNext())
      {
        TableData localTableData = this.report.getTemplateWorkBook().getTableData((String)localIterator.next());
        __setParameterValues(localTableData.getParameters());
      }
    }
    try
    {
      this.calculator.set("$$totalPage_number", "$$totalPage_number");
      this.calculator.set("$$page_number", "$$page_number");
    }
    catch (Exception localException)
    {
      FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
    }
    this.calculator.pushNameSpace(new LNS(this, null));
    this.calculator.pushNameSpace(ParameterMapNameSpace.create(paramMap));
  }

  public ResultReport execute(int paramInt)
  {
    long l1 = System.currentTimeMillis();
    SynchronizedSEList.put(Thread.currentThread(), this);
    FRContext.getLogger().log(Level.INFO, Inter.getLocText("INFO-Start_Executing_Report"));
    SheetUtils.calculateDefaultParent(this.report);
    buildGenealogy();
    this.rowCount = this.report.getRowCount();
    this.columnCount = this.report.getColumnCount();
    Iterator localIterator1 = this.report.floatIterator();
    while (localIterator1.hasNext())
    {
      FloatElement localFloatElement = (FloatElement)localIterator1.next();
      Point[] arrayOfPoint = ReportHelper.calculateLastColumnAndRowOfFloatElement(this.report, localFloatElement);
      this.col_count_with_floatelem = Math.max(this.columnCount, arrayOfPoint[0].x + 1);
      this.row_count_with_floatelem = Math.max(this.rowCount, arrayOfPoint[0].y + 1);
    }
    this.be_beb_2D = new BEB[this.rowCount][this.columnCount];
    int i = 0;
    int j = this.genealogy.length;
    while (i < j)
    {
      FamilyMember[] arrayOfFamilyMember = this.genealogy[i];
      int k = 0;
      int l = arrayOfFamilyMember.length;
      while (k < l)
      {
        initBEB(arrayOfFamilyMember[k]);
        ++k;
      }
      ++i;
    }
    this.states = new boolean[this.rowCount][this.columnCount];
    Iterator localIterator2 = this.report.cellIterator();
    while (localIterator2.hasNext())
    {
      localObject = (com.fr.report.CellElement)localIterator2.next();
      calculateCellElement((com.fr.report.CellElement)localObject);
    }
    this.boxCase = new Box2DCase(this, this.rowCount, this.columnCount);
    ex(this.boxCase);
    Object localObject = Box2DCase.access$100(this.boxCase, this.report, (paramInt != 0) ? 1 : false, (paramInt == 0) ? 1 : false, (paramInt == 1) ? 1 : false, paramInt != 1);
    releaseTableData(this.report);
    this.calculator.release();
    if (paramInt == 0)
      releaseSE();
    long l2 = System.currentTimeMillis();
    FRContext.getLogger().log(Level.INFO, Inter.getLocText("INFO-End_Executing_Report") + "\t" + Inter.getLocText("INFO-Time_Taken") + ":" + (l2 - l1) + "ms!");
    SynchronizedSEList.removeSheetExecuter(Thread.currentThread());
    return ((ResultReport)localObject);
  }

  private void releaseSE()
  {
    this.report = null;
    this.calculator = null;
    this.parameterMap = null;
    this.genealogy = ((FamilyMember[][])null);
    this.be_beb_2D = ((BEB[][])null);
    this.states = ((boolean[][])null);
    for (int i = 0; i < this.boxCase.boxs2D.length; ++i)
      for (int j = 0; j < this.boxCase.boxs2D[i].length; ++j)
      {
        BoxCE localBoxCE = this.boxCase.boxs2D[i][j];
        if ((localBoxCE != null) && (localBoxCE.col == j))
        {
          if (localBoxCE.row != i)
            break label109:
          localBoxCE.be_from = null;
        }
      }
    label109: this.boxCase = null;
    this.executing_columnrow_list = null;
  }

  private void buildGenealogy()
  {
    this.genealogy = new FamilyMember[this.report.getRowCount()][this.report.getColumnCount()];
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = this.report.cellIterator();
    while (localIterator.hasNext())
    {
      com.fr.report.CellElement localCellElement = (com.fr.report.CellElement)localIterator.next();
      buildFamilyMember(localCellElement, localArrayList);
    }
  }

  private FamilyMember buildFamilyMember(com.fr.report.CellElement paramCellElement, List paramList)
  {
    ColumnRow localColumnRow;
    if (paramCellElement == null)
      return null;
    if (this.genealogy[paramCellElement.getRow()][paramCellElement.getColumn()] != null)
      return this.genealogy[paramCellElement.getRow()][paramCellElement.getColumn()];
    if (paramList.contains(paramCellElement))
    {
      paramList.add(paramCellElement);
      throw new DeathCycleException("Death cycle exists when calculate parent: " + paramList);
    }
    paramList.add(paramCellElement);
    CellExpandAttr localCellExpandAttr = paramCellElement.getCellExpandAttr();
    FamilyMember localFamilyMember1 = null;
    FamilyMember localFamilyMember2 = null;
    if ((localColumnRow = localCellExpandAttr.getLeftParentColumnRow()) != null)
    {
      localObject = this.report.getCellElement(localColumnRow.column, localColumnRow.row);
      localFamilyMember1 = buildFamilyMember((com.fr.report.CellElement)localObject, paramList);
    }
    if ((localColumnRow = localCellExpandAttr.getUpParentColumnRow()) != null)
    {
      localObject = this.report.getCellElement(localColumnRow.column, localColumnRow.row);
      localFamilyMember2 = buildFamilyMember((com.fr.report.CellElement)localObject, paramList);
    }
    Object localObject = new FamilyMember(paramCellElement, localFamilyMember1, localFamilyMember2);
    this.genealogy[paramCellElement.getRow()][paramCellElement.getColumn()] = localObject;
    paramList.remove(paramCellElement);
    if (localFamilyMember1 != null)
    {
      if (localFamilyMember1.sons == null)
        localFamilyMember1.sons = new ArrayList();
      localFamilyMember1.sons.add(localObject);
    }
    if (localFamilyMember2 != null)
    {
      if (localFamilyMember2.sons == null)
        localFamilyMember2.sons = new ArrayList();
      localFamilyMember2.sons.add(localObject);
    }
    return ((FamilyMember)localObject);
  }

  private BEB initBEB(FamilyMember paramFamilyMember)
  {
    if (paramFamilyMember == null)
      return null;
    com.fr.report.CellElement localCellElement = paramFamilyMember.current;
    BEB localBEB = this.be_beb_2D[localCellElement.getRow()][localCellElement.getColumn()];
    if (localBEB != null)
      return localBEB;
    BE localBE1 = null;
    BE localBE2 = null;
    int i = -1;
    int j = -1;
    if (paramFamilyMember.leftParent != null)
    {
      localBE1 = BEB.access$200(initBEB(paramFamilyMember.leftParent))[0];
      i = paramFamilyMember.leftParent.sons.indexOf(paramFamilyMember);
    }
    if (paramFamilyMember.upParent != null)
    {
      localBE2 = BEB.access$200(initBEB(paramFamilyMember.upParent))[0];
      j = paramFamilyMember.upParent.sons.indexOf(paramFamilyMember);
    }
    BE localBE3 = new BE(localBE1, localBE2);
    localBEB = this.be_beb_2D[localCellElement.getRow()][localCellElement.getColumn()] =  = new BEB(new BE[] { localBE3 }, localCellElement);
    if (paramFamilyMember.sons != null)
      localBE3.sons = new BE[paramFamilyMember.sons.size()];
    if (localBE1 != null)
      localBE1.sons[i] = localBE3;
    if (localBE2 != null)
      localBE2.sons[j] = localBE3;
    return localBEB;
  }

  private void calculateCellElement(com.fr.report.CellElement paramCellElement)
  {
    if (paramCellElement == null)
      return;
    if (this.states[paramCellElement.getRow()][paramCellElement.getColumn()] != 0)
      return;
    ColumnRow localColumnRow = ColumnRow.valueOf(paramCellElement.getColumn(), paramCellElement.getRow());
    if (this.executing_columnrow_list.contains(localColumnRow))
    {
      this.executing_columnrow_list.add(localColumnRow);
      throw new DeathCycleException("Death cycle exists: " + this.executing_columnrow_list);
    }
    this.executing_columnrow_list.add(localColumnRow);
    ArrayList localArrayList = new ArrayList();
    __getCellElementParameters(paramCellElement, localArrayList);
    __setParameterValues(localArrayList);
    localArrayList.clear();
    FamilyMember localFamilyMember = this.genealogy[paramCellElement.getRow()][paramCellElement.getColumn()];
    if (localFamilyMember.leftParent != null)
      calculateCellElement(localFamilyMember.leftParent.current);
    if (localFamilyMember.upParent != null)
      calculateCellElement(localFamilyMember.upParent.current);
    BEB localBEB = getBEB5BEB2D(localColumnRow, false);
    BE[] arrayOfBE = BEB.access$200(localBEB);
    for (int i = 0; i < arrayOfBE.length; ++i)
      arrayOfBE[i].cc_ce_array(this.calculator);
    refresh_be_array_relation(arrayOfBE);
    this.executing_columnrow_list.remove(localColumnRow);
    this.states[localColumnRow.row][localColumnRow.column] = 1;
  }

  private BoxCE[] dealWithBEDSColumn(BE paramBE, DSColumn paramDSColumn)
  {
    int[] arrayOfInt;
    String str = paramDSColumn.getDSName();
    Object[] arrayOfObject = dealwithDsName(str);
    str = (String)arrayOfObject[0];
    TableData localTableData = (TableData)arrayOfObject[1];
    if (localTableData == null)
    {
      if (!(paramDSColumn.isReselect()))
        localTableData = cc_be_source_tabledata(paramBE, str);
      if (localTableData == null)
        if (paramDSColumn.getParameters().length > 0)
          localTableData = __nameParameter2TableData(str, paramDSColumn.getParameters());
        else
          localTableData = __s_name2TableData(str);
    }
    int i = 0;
    try
    {
      i = localTableData.getColumnCount();
    }
    catch (TableDataException localTableDataException)
    {
      FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
      throw new RuntimeException(localTableDataException.getMessage(), localTableDataException);
    }
    int j = paramDSColumn.getColumn().getColumnIndex(localTableData, this.calculator);
    if ((j >= -1) && (j < i))
    {
      arrayOfInt = dealWithBEDSColumn_source_rows(paramBE, localTableData, paramDSColumn);
      paramBE.sourceDSName = str;
      paramBE.sourceTableData = localTableData;
    }
    else
    {
      arrayOfInt = new int[0];
    }
    Group[] arrayOfGroup = paramDSColumn.dealwith_condition_group_sort_select_result(localTableData, j, arrayOfInt, this.calculator);
    if (arrayOfGroup.length == 0)
      return new BoxCE[] { new BoxCE_Extend(new int[0], Primitive.NULL, paramBE) };
    BoxCE_Extend[] arrayOfBoxCE_Extend = new BoxCE_Extend[arrayOfGroup.length];
    for (int k = 0; k < arrayOfGroup.length; ++k)
      arrayOfBoxCE_Extend[k] = new BoxCE_Extend(arrayOfGroup[k].getArray(), arrayOfGroup[k].getValue(), paramBE);
    return arrayOfBoxCE_Extend;
  }

  private TableData __nameParameter2TableData(String paramString, Parameter[] paramArrayOfParameter)
  {
    TableData localTableData;
    int j;
    HashMap localHashMap = new HashMap();
    for (int i = 0; i < paramArrayOfParameter.length; ++i)
    {
      Object localObject1 = paramArrayOfParameter[i].getValue();
      if ((localObject1 instanceof Formula) && (StringUtils.isNotBlank(((Formula)localObject1).getContent())))
        try
        {
          localObject1 = new SimpleKV(localObject1, this.calculator.eval(((Formula)localObject1).getContent().substring(1)));
        }
        catch (UtilEvalError localUtilEvalError)
        {
          FRContext.getLogger().log(Level.WARNING, localUtilEvalError.getMessage(), localUtilEvalError);
        }
      localHashMap.put(paramArrayOfParameter[i].getName(), localObject1);
    }
    if (!(this.new_ds_map.containsKey(paramString)))
      this.new_ds_map.put(paramString, new ArrayList());
    List localList = (List)this.new_ds_map.get(paramString);
    if ((j = localList.indexOf(localHashMap)) > -1)
    {
      localTableData = this.calculator.getCurrentTableDataSource().getTableData(paramString + "_$_" + j);
    }
    else
    {
      int k;
      localTableData = __s_name2TableData(paramString);
      try
      {
        localTableData = (TableData)localTableData.clone();
      }
      catch (CloneNotSupportedException localCloneNotSupportedException)
      {
      }
      if (localTableData.getParameters() != null)
        for (k = 0; k < localTableData.getParameters().length; ++k)
        {
          Parameter localParameter = localTableData.getParameters()[k];
          Object localObject2 = localHashMap.get(localParameter.getName());
          if (localObject2 instanceof SimpleKV)
            localParameter.setValue(((SimpleKV)localObject2).getValue());
          else if (localObject2 != null)
            localParameter.setValue(localObject2);
        }
      localList.add(localHashMap);
      this.calculator.getCurrentTableDataSource().putTableData(paramString + "_$_" + (localList.size() - 1), localTableData);
    }
    return ((TableData)localTableData);
  }

  private TableData cc_be_source_tabledata(BE paramBE, String paramString)
  {
    if ((paramBE == null) || (paramString == null))
      return null;
    TableData localTableData1 = cc_ce_source_tabledata((BoxCE)paramBE.left, paramString);
    TableData localTableData2 = cc_ce_source_tabledata((BoxCE)paramBE.up, paramString);
    if ((localTableData1 == null) && (localTableData1 == null))
      return null;
    if (localTableData1 == null)
      return localTableData2;
    if (localTableData2 == null)
      return localTableData1;
    if (paramBE.get_ce_from().getCellExpandAttr() != null)
    {
      if (paramBE.get_ce_from().getCellExpandAttr().getDirection() == 0)
        return localTableData1;
      if (paramBE.get_ce_from().getCellExpandAttr().getDirection() == 1)
        return localTableData2;
    }
    return null;
  }

  private TableData cc_ce_source_tabledata(BoxCE paramBoxCE, String paramString)
  {
    if ((paramBoxCE == null) || (paramString == null))
      return null;
    if (!(paramBoxCE instanceof BoxCE_Extend))
      return null;
    if ((paramBoxCE.be_from.sourceDSName != null) && (paramBoxCE.be_from.sourceDSName.equals(paramString)))
      return paramBoxCE.be_from.sourceTableData;
    return cc_be_source_tabledata(paramBoxCE.be_from, paramString);
  }

  public Calculator getCurrentCalculator()
  {
    return this.calculator;
  }

  private int[] dealWithBEDSColumn_source_rows(BE paramBE, TableData paramTableData, DSColumn paramDSColumn)
  {
    int[] arrayOfInt;
    if (paramTableData == null)
      return new int[0];
    if (paramDSColumn.isReselect())
      try
      {
        arrayOfInt = IntList.range(paramTableData.getRowCount());
      }
      catch (TableDataException localTableDataException)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
        arrayOfInt = new int[0];
      }
    else
      arrayOfInt = cc_be_source(paramBE, paramTableData);
    return ((arrayOfInt == null) ? new int[0] : arrayOfInt);
  }

  private BoxCE[] dealWithBENormal(BE paramBE, Object paramObject)
  {
    Object localObject1;
    Object localObject2;
    Object localObject3;
    if (paramObject instanceof Formula)
    {
      localObject1 = ((Formula)paramObject).getContent();
      localObject2 = null;
      try
      {
        localObject2 = this.calculator.eval(((String)localObject1).substring(1));
      }
      catch (Exception localException)
      {
        localObject3 = "error happens at calculating formula\ncell is " + paramBE.get_ce_from() + "\nformula expression is " + ((String)localObject1) + "\nerror message is " + localException.getMessage();
        FRContext.getLogger().warning((String)localObject3);
      }
      if ((((Formula)paramObject).isReserveInResult()) || ((((Formula)paramObject).isReserveOnWrite()) && (!(localObject2 instanceof FArray))))
        try
        {
          paramObject = ((Formula)paramObject).clone();
          ((Formula)paramObject).setResult(localObject2);
        }
        catch (CloneNotSupportedException localCloneNotSupportedException)
        {
          FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException.getMessage(), localCloneNotSupportedException);
          paramObject = localObject2;
        }
      else
        paramObject = localObject2;
    }
    if (paramObject instanceof FArray)
    {
      int i;
      localObject1 = (FArray)paramObject;
      localObject2 = (BoxCE_Extend[])paramBE.ce_array;
      if (localObject2 == null)
      {
        i = ((FArray)localObject1).length();
        localObject3 = new BoxCE[i];
        for (int j = 0; j < i; ++j)
          localObject3[j] = new BoxCE(((FArray)localObject1).elementAt(j), paramBE);
        if (localObject3.length == 0)
          localObject3 = new BoxCE[] { new BoxCE(Primitive.NULL, paramBE) };
        return localObject3;
      }
      if (localObject2.length == ((FArray)localObject1).length())
      {
        i = 0;
        while (true)
        {
          if (i >= localObject2.length)
            break label345;
          localObject2[i].setValue(((FArray)localObject1).elementAt(i));
          ++i;
        }
      }
      if ((localObject2.length > 0) && (((FArray)localObject1).length() > 0))
      {
        localObject2[0].setValue(((FArray)localObject1).elementAt(0));
        localObject2[0].rows = new int[0];
      }
      label345: return localObject2;
    }
    if (paramObject instanceof Formula)
    {
      localObject1 = (java.util.Map)this.calculator.getAttribute(BE_CC_ROWS_MAP);
      return new BoxCE[] { new BoxCE_Extend((int[])((java.util.Map)localObject1).get(paramBE), paramObject, paramBE) };
    }
    if (paramObject instanceof BiasTextPainter)
    {
      localObject1 = ((BiasTextPainter)paramObject).getText();
      ((BiasTextPainter)paramObject).setText(this.calculator.renderTpl((String)localObject1));
      return new BoxCE[] { new BoxCE(paramObject, paramBE) };
    }
    return ((BoxCE)(BoxCE)(BoxCE)new BoxCE[] { new BoxCE(paramObject, paramBE) });
  }

  private BoxCE[] dealWithSubReport(BE paramBE, SubReport paramSubReport)
  {
    if (paramSubReport == null)
      return null;
    HashMap localHashMap = new HashMap();
    KV[] arrayOfKV = paramSubReport.getParameterKVS();
    for (int i = 0; i < ((arrayOfKV == null) ? 0 : arrayOfKV.length); ++i)
    {
      localObject2 = arrayOfKV[i];
      String str1 = ((KV)localObject2).getKey();
      Object localObject3 = ((KV)localObject2).getValue();
      if (localObject3 instanceof Formula)
      {
        String str2 = ((Formula)localObject3).getContent();
        try
        {
          localObject3 = this.calculator.eval(str2.substring(1));
        }
        catch (Exception localException)
        {
          String str3 = "error happens at calculating formula\ncell is " + paramBE.get_ce_from() + "\nformula expression is " + str2 + "\nerror message is " + localException.getMessage();
          throw new RuntimeException(str3, localException);
        }
      }
      localHashMap.put(str1, localObject3);
    }
    if (paramSubReport.isExtendOwnerParameters())
    {
      localObject1 = this.parameterMap.entrySet().iterator();
      while (true)
      {
        do
        {
          if (!(((Iterator)localObject1).hasNext()))
            break label260;
          localObject2 = (Map.Entry)((Iterator)localObject1).next();
        }
        while (localHashMap.containsKey(((Map.Entry)localObject2).getKey()));
        localHashMap.put(((Map.Entry)localObject2).getKey(), ((Map.Entry)localObject2).getValue());
      }
    }
    label260: Object localObject1 = paramSubReport.execute(localHashMap);
    Object localObject2 = (java.util.Map)this.calculator.getAttribute(BE_CC_ROWS_MAP);
    return ((BoxCE)(BoxCE)new BoxCE[] { new BoxCE_Extend((int[])((java.util.Map)localObject2).get(paramBE), localObject1, paramBE) });
  }

  private void dealWithChartTitle(Title paramTitle)
  {
    if ((paramTitle != null) && (paramTitle.getTextObject() instanceof Formula))
    {
      Object localObject;
      Formula localFormula = (Formula)paramTitle.getTextObject();
      String str1 = localFormula.getContent();
      try
      {
        localObject = this.calculator.eval(str1.substring(1));
      }
      catch (UtilEvalError localUtilEvalError)
      {
        String str2 = "error happens at calculate formula\nformula expression is " + str1 + "\nerror message is " + localUtilEvalError.getMessage();
        FRContext.getLogger().log(Level.WARNING, str2, localUtilEvalError);
        localObject = str1;
      }
      if (localObject != null)
        paramTitle.setTextObject(localObject.toString());
    }
  }

  private Object dealAlertValueFormula(Object paramObject)
  {
    if (paramObject instanceof Formula)
    {
      Object localObject;
      Formula localFormula = (Formula)paramObject;
      String str1 = localFormula.getContent();
      try
      {
        localObject = this.calculator.eval(str1.substring(1));
      }
      catch (UtilEvalError localUtilEvalError)
      {
        String str2 = "error happens at calculate formula\nformula expression is " + str1 + "\nerror message is " + localUtilEvalError.getMessage();
        FRContext.getLogger().log(Level.WARNING, str2, localUtilEvalError);
        localObject = str1;
      }
      if (localObject != null)
        return localObject;
    }
    return paramObject;
  }

  private ChartPainter dealWithChart(BoxCE paramBoxCE, ChartCollection paramChartCollection)
  {
    Object localObject4;
    Object localObject5;
    if ((paramChartCollection == null) || (paramChartCollection.getChartSize() == 0))
      return null;
    ColumnRow localColumnRow = null;
    if ((this.calculator != null) && (paramBoxCE != null))
    {
      localColumnRow = this.calculator.getCurrentColumnRow();
      this.calculator.setCurrentColumnRow(ColumnRow.valueOf(paramBoxCE.getColumn(), paramBoxCE.getRow()));
    }
    for (int i = 0; i < paramChartCollection.getChartSize(); ++i)
    {
      Object localObject2;
      localObject1 = paramChartCollection.getChart(i);
      dealWithChartTitle(((Chart)localObject1).getTitle());
      Plot localPlot = ((Chart)localObject1).getPlot();
      if (localPlot instanceof CategoryPlot)
      {
        localObject2 = ((CategoryPlot)localPlot).getCategoryAxis();
        dealWithChartTitle(((Axis)localObject2).getTitle());
        localObject3 = ((CategoryPlot)localPlot).getValueAxis();
        dealWithChartTitle(((ValueAxis)localObject3).getTitle());
        if (((ValueAxis)localObject3).hasAlertValue())
          ((ValueAxis)localObject3).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject3).getAlertValue()));
      }
      else if (localPlot instanceof XYScatterPlot)
      {
        localObject2 = (XYScatterPlot)localPlot;
        localObject3 = ((XYScatterPlot)localObject2).getXAxis();
        dealWithChartTitle(((ValueAxis)localObject3).getTitle());
        if (((ValueAxis)localObject3).hasAlertValue())
          ((ValueAxis)localObject3).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject3).getAlertValue()));
        localObject4 = ((XYScatterPlot)localObject2).getYAxis();
        dealWithChartTitle(((ValueAxis)localObject4).getTitle());
        if (((ValueAxis)localObject4).hasAlertValue())
          ((ValueAxis)localObject4).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject4).getAlertValue()));
      }
      else if (localPlot instanceof RadarPlot)
      {
        localObject2 = ((RadarPlot)localPlot).getRadarAxis();
        dealWithChartTitle(((Axis)localObject2).getTitle());
      }
      else if (localPlot instanceof StockPlot)
      {
        localObject2 = (StockPlot)localPlot;
        localObject3 = ((StockPlot)localObject2).getCategoryAxis();
        dealWithChartTitle(((Axis)localObject3).getTitle());
        localObject4 = ((StockPlot)localObject2).getPriceAxis();
        if (((ValueAxis)localObject4).hasAlertValue())
          ((ValueAxis)localObject4).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject4).getAlertValue()));
        dealWithChartTitle(((ValueAxis)localObject4).getTitle());
        localObject5 = ((StockPlot)localObject2).getVolumeAxis();
        if (localObject5 != null)
        {
          if (((ValueAxis)localObject5).hasAlertValue())
            ((ValueAxis)localObject5).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject4).getAlertValue()));
          dealWithChartTitle(((ValueAxis)localObject5).getTitle());
        }
      }
      else if (localPlot instanceof RangePlot)
      {
        localObject2 = (RangePlot)localPlot;
        localObject3 = ((RangePlot)localObject2).getValueAxis();
        dealWithChartTitle(((ValueAxis)localObject3).getTitle());
        if (((ValueAxis)localObject3).hasAlertValue())
          ((ValueAxis)localObject3).setAlertValue(dealAlertValueFormula(((ValueAxis)localObject3).getAlertValue()));
      }
    }
    Chart localChart = paramChartCollection.getSelectedChart();
    Object localObject1 = ChartDataModel.getChartData(localChart.getPlot());
    int j = -1;
    int k = -1;
    Object localObject3 = paramChartCollection.getFilterDefinition();
    if (localObject3 instanceof TableDataDefinition)
    {
      try
      {
        localObject4 = (TableDataDefinition)((FCloneable)localObject3).clone();
        if (((TableDataDefinition)localObject4).getTableData() instanceof NameTableData)
        {
          localObject5 = (NameTableData)((TableDataDefinition)localObject4).getTableData();
          ((TableDataDefinition)localObject4).setTableData(__us_name2TableData(((NameTableData)localObject5).getName()));
        }
        localObject1 = ((TableDataDefinition)localObject4).createChartData();
        j = ((TableDataDefinition)localObject4).getTopCate();
        k = ((TableDataDefinition)localObject4).getTopValue();
      }
      catch (CloneNotSupportedException localCloneNotSupportedException)
      {
        localCloneNotSupportedException.printStackTrace();
      }
    }
    else if (localObject3 instanceof ReportDataDefinition)
    {
      Object localObject6;
      label755: Object localObject7;
      label825: label1109: Object localObject8;
      label1414: label1858: Object localObject9;
      Object localObject12;
      Object localObject13;
      Object localObject14;
      Object localObject18;
      Object localObject20;
      Object localObject27;
      int i22;
      Object localObject28;
      localObject4 = (ReportDataDefinition)localObject3;
      j = ((ReportDataDefinition)localObject4).getTopCate();
      k = ((ReportDataDefinition)localObject4).getTopValue();
      boolean bool = ((ReportDataDefinition)localObject4).isBaseOnDataValueArea();
      if (bool)
      {
        int i10;
        int i11;
        label2148: Object localObject23;
        if ((((ReportDataDefinition)localObject4).getSeriesNameString() == null) && (((ReportDataDefinition)localObject4).getCategoryNameString() == null))
        {
          Object[] arrayOfObject2;
          Object[] arrayOfObject3;
          Object localObject22;
          Object localObject26;
          localObject6 = parseString2BoxArray(((ReportDataDefinition)localObject4).getSeriesValueString(), paramBoxCE);
          int l = ((ReportDataDefinition)localObject4).getSeriesPos();
          int i1 = 0;
          int i2 = 0;
          Object localObject10 = localObject6[0].getValue();
          int i8 = localObject6[0].getRowSpan();
          int i9 = localObject6[0].getColumnSpan();
          if (localObject10 instanceof java.lang.Number)
          {
            i1 = i9;
            i2 = i8;
          }
          else
          {
            Object localObject15;
            for (i10 = 1; i10 < i9; ++i10)
            {
              localObject15 = localObject6[i10].getValue();
              if (localObject15 == null)
              {
                if (i10 != i9 - 1)
                  break label755;
                i1 = i9 - 1;
                break;
              }
              i1 = i9 - i10;
              break;
            }
            i10 = i9;
            while (i10 < localObject6.length)
            {
              localObject15 = localObject6[i10].getValue();
              if (localObject15 == null)
              {
                if (i10 != localObject6.length - i9)
                  break label825;
                i2 = i8 - i10 / i8;
                break;
              }
              i2 = i8 - i10 / i9;
              break;
              i10 += i9;
            }
          }
          if (l == 1)
          {
            Object localObject16;
            arrayOfObject2 = new Object[i1];
            i10 = i9 - i1;
            if (i2 == i8)
            {
              i11 = 0;
              while (true)
              {
                if (i11 >= i1)
                  break label1109;
                arrayOfObject2[i11] = new Integer(i11 + 1).toString();
                ++i11;
              }
            }
            if (i2 == i8 - 1)
            {
              i11 = i10;
              while (true)
              {
                if (i11 >= i9)
                  break label1109;
                localObject16 = localObject6[i11].getValue();
                if (localObject16 != null)
                  arrayOfObject2[(i11 - i10)] = localObject16.toString();
                else
                  arrayOfObject2[(i11 - i10)] = " ";
                ++i11;
              }
            }
            if (i2 < i8 - 1)
              for (i11 = i10; i11 < i9; ++i11)
              {
                localObject16 = "";
                for (int i14 = 0; i14 < i8 - i2; ++i14)
                {
                  Object localObject21 = localObject6[(i11 + i14 * i9)].getValue();
                  if (localObject21 != null)
                    localObject16 = ((String)localObject16) + "\r\n" + localObject21.toString();
                  else
                    localObject16 = ((String)localObject16) + "\r\n" + " ";
                }
                arrayOfObject2[(i11 - i10)] = localObject16;
              }
            arrayOfObject3 = new Object[i2];
            i11 = localObject6.length - i9 * i2;
            if (i1 == i9)
            {
              i12 = 0;
              while (true)
              {
                if (i12 >= i2)
                  break label1414;
                arrayOfObject3[i12] = Inter.getLocText("ChartF-Series") + new Integer(i12 + 1).toString();
                ++i12;
              }
            }
            if (i1 == i9 - 1)
            {
              i12 = i11;
              while (true)
              {
                if (i12 >= localObject6.length)
                  break label1414;
                localObject19 = localObject6[i12].getValue();
                if (localObject19 != null)
                  arrayOfObject3[(i12 / i11 - 1)] = localObject19.toString();
                else
                  arrayOfObject3[(i12 / i11 - 1)] = " ";
                i12 += i9;
              }
            }
            if (i1 < i9 - 1)
            {
              i12 = i11;
              while (i12 < localObject6.length)
              {
                localObject19 = "";
                for (int i16 = 0; i16 < i9 - i1; ++i16)
                {
                  Object localObject25 = localObject6[(i12 + i16)].getValue();
                  if (localObject25 != null)
                    localObject19 = ((String)localObject19) + "\r\n" + localObject25.toString();
                  else
                    localObject19 = ((String)localObject19) + "\r\n" + " ";
                }
                arrayOfObject3[(i12 - i11)] = localObject19;
                i12 += i9;
              }
            }
            int i12 = i11 + i10;
            Object localObject19 = new ArrayList();
            localObject22 = new ArrayList();
            for (int i19 = 0; i19 < i2; ++i19)
            {
              ((List)localObject22).clear();
              for (i22 = 0; i22 < i1; ++i22)
              {
                localObject28 = localObject6[(i12 + i22 + i19 * i9)].getValue();
                ((List)localObject22).add(dealChartValueFormula(this.calculator, localObject28));
              }
              ((List)localObject19).add(((List)localObject22).toArray());
            }
            localObject26 = (Object[][])((List)localObject19).toArray(new Object[((List)localObject19).size()][]);
            label3266: label3430: label3445: localObject1 = new ReportChartData(arrayOfObject2, arrayOfObject3, localObject26);
          }
          else if (l == 0)
          {
            Object localObject17;
            arrayOfObject2 = new Object[i2];
            i10 = localObject6.length - i9 * i2;
            if (i1 == i9)
            {
              i11 = 0;
              while (true)
              {
                if (i11 >= i2)
                  break label1858;
                arrayOfObject2[i11] = new Integer(i11 + 1).toString();
                ++i11;
              }
            }
            if (i1 == i9 - 1)
            {
              i11 = i10;
              while (true)
              {
                if (i11 >= localObject6.length)
                  break label1858;
                localObject17 = localObject6[i11].getValue();
                if (localObject17 != null)
                  arrayOfObject2[(i11 / i10 - 1)] = localObject17.toString();
                else
                  arrayOfObject2[(i11 / i10 - 1)] = " ";
                i11 += i9;
              }
            }
            if (i1 < i9 - 1)
            {
              i11 = i10;
              while (i11 < localObject6.length)
              {
                localObject17 = "";
                for (int i15 = 0; i15 < i9 - i1; ++i15)
                {
                  localObject22 = localObject6[(i11 + i15)].getValue();
                  if (localObject22 != null)
                    localObject17 = ((String)localObject17) + "\r\n" + localObject22.toString();
                  else
                    localObject17 = ((String)localObject17) + "\r\n" + " ";
                }
                arrayOfObject2[(i11 - i10)] = localObject17;
                i11 += i9;
              }
            }
            arrayOfObject3 = new Object[i1];
            i11 = i9 - i1;
            if (i2 == i8)
            {
              i13 = 0;
              while (true)
              {
                if (i13 >= i1)
                  break label2148;
                arrayOfObject3[i13] = Inter.getLocText("ChartF-Series") + new Integer(i13 + 1).toString();
                ++i13;
              }
            }
            if (i2 == i8 - 1)
            {
              i13 = i11;
              while (true)
              {
                if (i13 >= i9)
                  break label2148;
                localObject20 = localObject6[i13].getValue();
                if (localObject20 != null)
                  arrayOfObject3[(i13 - i11)] = localObject20.toString();
                else
                  arrayOfObject3[(i13 - i11)] = " ";
                ++i13;
              }
            }
            if (i2 < i8 - 1)
              for (i13 = i11; i13 < i9; ++i13)
              {
                localObject20 = "";
                for (int i17 = 0; i17 < i9 - i1; ++i17)
                {
                  localObject26 = localObject6[(i13 + i17 * i9)].getValue();
                  if (localObject26 != null)
                    localObject20 = ((String)localObject20) + "\r\n" + localObject26.toString();
                  else
                    localObject20 = ((String)localObject20) + "\r\n" + " ";
                }
                arrayOfObject3[(i13 - i11)] = localObject20;
              }
            int i13 = i11 + i10;
            localObject20 = new ArrayList();
            localObject23 = new ArrayList();
            for (int i20 = 0; i20 < i1; ++i20)
            {
              ((List)localObject23).clear();
              for (i22 = 0; i22 < i2; ++i22)
              {
                localObject28 = localObject6[(i13 + i22 * i9 + i20)].getValue();
                ((List)localObject23).add(dealChartValueFormula(this.calculator, localObject28));
              }
              ((List)localObject20).add(((List)localObject23).toArray());
            }
            localObject27 = (Object[][])((List)localObject20).toArray(new Object[((List)localObject20).size()][]);
            localObject1 = new ReportChartData(arrayOfObject2, arrayOfObject3, localObject27);
          }
        }
        else
        {
          localObject6 = parseString2BoxArray(((ReportDataDefinition)localObject4).getCategoryNameString(), paramBoxCE);
          localObject7 = parseString2BoxArray(((ReportDataDefinition)localObject4).getSeriesNameString(), paramBoxCE);
          localObject8 = parseString2BoxArray(((ReportDataDefinition)localObject4).getSeriesValueString(), paramBoxCE);
          Object[] arrayOfObject1 = new Object[localObject6.length];
          int i4 = 0;
          int i5 = localObject6.length;
          while (i4 < i5)
          {
            arrayOfObject1[i4] = dealChartValueFormula(this.calculator, localObject6[i4].getValue());
            ++i4;
          }
          localObject9 = new Object[localObject7.length];
          i5 = 0;
          int i7 = localObject7.length;
          while (i5 < i7)
          {
            localObject9[i5] = dealChartValueFormula(this.calculator, localObject7[i5].getValue());
            ++i5;
          }
          ListSet localListSet = new ListSet();
          for (i7 = 0; i7 < localObject9.length; ++i7)
            localListSet.add(localObject9[i7]);
          localObject9 = localListSet.toArray();
          i7 = ((ReportDataDefinition)localObject4).getSeriesPos();
          localObject12 = new ArrayList();
          localObject13 = new HashMap();
          i10 = 0;
          i11 = localObject8.length;
          while (i10 < i11)
          {
            localObject18 = localObject8[i10];
            if (i7 == 1)
              localObject20 = new Integer(((BoxCE)localObject18).getRow());
            else
              localObject20 = new Integer(((BoxCE)localObject18).getColumn());
            if (!(((java.util.Map)localObject13).containsKey(localObject20)))
            {
              ((List)localObject12).add(localObject20);
              ((java.util.Map)localObject13).put(localObject20, new ArrayList());
            }
            localObject23 = (List)((java.util.Map)localObject13).get(localObject20);
            ((List)localObject23).add(dealChartValueFormula(this.calculator, ((BoxCE)localObject18).getValue()));
            ++i10;
          }
          localObject14 = new Object[((List)localObject12).size()][];
          for (i11 = 0; i11 < ((List)localObject12).size(); ++i11)
          {
            localObject18 = (List)((java.util.Map)localObject13).get(((List)localObject12).get(i11));
            localObject14[i11] = ((List)localObject18).toArray(new Object[((List)localObject18).size()]);
          }
          localObject1 = new ReportChartData(arrayOfObject1, localObject9, localObject14);
        }
      }
      else
      {
        localObject6 = new ArrayList();
        dealCellString((List)localObject6, ((ReportDataDefinition)localObject4).getCategoryNameString(), paramBoxCE);
        localObject7 = ((List)localObject6).toArray();
        if (!(localChart.getPlot() instanceof XYScatterPlot))
        {
          localObject8 = new ListSet();
          for (int i3 = 0; i3 < localObject7.length; ++i3)
            ((ListSet)localObject8).add(localObject7[i3]);
          localObject7 = ((ListSet)localObject8).toArray();
        }
        localObject8 = new ListSet();
        ArrayList localArrayList = new ArrayList();
        localObject9 = ((ReportDataDefinition)localObject4).getSeriesList();
        for (int i6 = 0; i6 < ((List)localObject9).size(); ++i6)
        {
          Object localObject24;
          localObject11 = new ArrayList();
          localObject12 = (ReportDataDefinition.SeriesEntry)((List)localObject9).get(i6);
          localObject13 = ((ReportDataDefinition.SeriesEntry)localObject12).getSeriesName();
          localObject14 = localObject13;
          if (((String)localObject13).startsWith("="))
            localObject14 = ((String)localObject13).substring(1);
          ColumnRow[] arrayOfColumnRow = ChartUtils.convertStringToColumnRow((String)localObject14);
          if (ColumnRow.validate(arrayOfColumnRow[0]))
          {
            localObject18 = parseString2BoxArray((String)localObject14, paramBoxCE);
            localObject20 = new ListSet();
            for (int i18 = 0; i18 < localObject18.length; ++i18)
            {
              localObject27 = (localObject18[i18].getValue() == null) ? "" : localObject18[i18].getValue().toString();
              ((ListSet)localObject20).add(localObject27);
              ((ListSet)localObject8).add(localObject27);
            }
            localObject24 = ((ReportDataDefinition.SeriesEntry)localObject12).getValue().toString();
            if (((String)localObject24).startsWith("="))
              localObject24 = ((String)localObject24).substring(1);
            localObject27 = parseString2BoxArray((String)localObject24, paramBoxCE);
            i22 = 0;
            while (true)
            {
              if (i22 >= ((ListSet)localObject20).size())
                break label3445;
              localObject28 = ((ListSet)localObject20).get(i22).toString();
              localObject11 = new ArrayList();
              BoxCE[] arrayOfBoxCE = parseString2BoxArray(((ReportDataDefinition)localObject4).getCategoryNameString(), paramBoxCE);
              for (int i23 = 0; i23 < arrayOfBoxCE.length; ++i23)
              {
                BoxCE localBoxCE = arrayOfBoxCE[i23];
                if (localBoxCE instanceof BoxCE_Extend)
                {
                  BoxCE_Extend localBoxCE_Extend = (BoxCE_Extend)localBoxCE;
                  int[] arrayOfInt = localBoxCE_Extend.getRows();
                  int i24 = 0;
                  while (true)
                  {
                    if (i24 >= arrayOfInt.length)
                      break label3266;
                    int i25 = arrayOfInt[i24];
                    if ((i25 < localObject27.length) && (i25 < localObject18.length))
                    {
                      Object localObject29 = localObject18[i25].getValue();
                      if (localObject29.equals(localObject28))
                        ((List)localObject11).add(dealChartValueFormula(this.calculator, localObject27[i25].getValue()));
                    }
                    ++i24;
                  }
                }
                if ((i23 < localObject27.length) && (localObject27[i23] != null))
                  ((List)localObject11).add(dealChartValueFormula(this.calculator, localObject27[i23].getValue()));
              }
              localArrayList.add(((List)localObject11).toArray());
              ++i22;
            }
          }
          ((ListSet)localObject8).add(localObject14);
          localObject18 = ((ReportDataDefinition.SeriesEntry)localObject12).getValue().toString();
          if (((String)localObject18).startsWith("="))
            localObject18 = ((String)localObject18).substring(1);
          localObject20 = ChartUtils.convertStringToColumnRow((String)localObject18);
          if (ColumnRow.validate(localObject20[0]))
          {
            localObject24 = parseString2BoxArray((String)localObject18, paramBoxCE);
            int i21 = 0;
            while (true)
            {
              if ((i21 >= localObject24.length) || (i21 >= ((List)localObject6).size()))
                break label3430;
              ((List)localObject11).add(dealChartValueFormula(this.calculator, localObject24[i21].getValue()));
              ++i21;
            }
          }
          ((List)localObject11).add(dealChartValueFormula(this.calculator, ((ReportDataDefinition.SeriesEntry)localObject12).getValue()));
          localArrayList.add(((List)localObject11).toArray());
        }
        Object[] arrayOfObject4 = ((ListSet)localObject8).toArray(new Object[((ListSet)localObject8).size()]);
        Object localObject11 = (Object[][])localArrayList.toArray(new Object[arrayOfObject4.length][]);
        localObject1 = new ReportChartData(localObject7, arrayOfObject4, localObject11);
      }
    }
    else if (localObject3 instanceof ChartDataDefinition)
    {
      localObject1 = ((ChartDataDefinition)localObject3).createChartData();
    }
    localObject1 = new TopChartData((ChartData)localObject1, j, k);
    if ((this.calculator != null) && (localColumnRow != null))
      this.calculator.setCurrentColumnRow(localColumnRow);
    return ((localObject1 != null) ? paramChartCollection.createChartPainter((ChartData)localObject1) : (ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)(ChartPainter)null);
  }

  private Object dealChartValueFormula(Calculator paramCalculator, Object paramObject)
  {
    Object localObject = null;
    if (paramObject instanceof Formula)
    {
      Formula localFormula = (Formula)paramObject;
      try
      {
        if (localFormula.getResult() != null)
          localObject = localFormula.getResult();
        else
          localObject = paramCalculator.eval(localFormula.getContent());
      }
      catch (UtilEvalError localUtilEvalError)
      {
        localUtilEvalError.printStackTrace();
      }
    }
    else
    {
      localObject = paramObject;
    }
    return localObject;
  }

  private void dealCellString(List paramList, String paramString, BoxCE paramBoxCE)
  {
    String str = paramString;
    if ((str != null) && (str.startsWith("=")))
      str = str.substring(1);
    ColumnRow[] arrayOfColumnRow = ChartUtils.convertStringToColumnRow(str);
    if (ColumnRow.validate(arrayOfColumnRow[0]))
    {
      BoxCE[] arrayOfBoxCE = parseString2BoxArray(str, paramBoxCE);
      int i = 0;
      int j = arrayOfBoxCE.length;
      while (true)
      {
        if (i >= j)
          return;
        Object localObject = arrayOfBoxCE[i].getValue();
        if ((localObject instanceof Formula) && (((Formula)localObject).getResult() != null))
          localObject = ((Formula)localObject).getResult();
        paramList.add(localObject);
        ++i;
      }
    }
    paramList.add(paramString);
  }

  private BoxCE[] parseString2BoxArray(String paramString, BoxCE paramBoxCE)
  {
    if (paramString == null)
      return new BoxCE[0];
    ColumnRow[] arrayOfColumnRow = ChartUtils.convertStringToColumnRow(paramString);
    int i = arrayOfColumnRow.length - 1;
    int j = arrayOfColumnRow[i].getRow() - arrayOfColumnRow[0].getRow() + 1;
    int k = arrayOfColumnRow[i].getColumn() - arrayOfColumnRow[0].getColumn() + 1;
    HashSet localHashSet = new HashSet();
    for (int l = 0; l < arrayOfColumnRow.length; ++l)
    {
      BoxCE[] arrayOfBoxCE2 = resolveBoxColumnRow(arrayOfColumnRow[l], paramBoxCE);
      List localList = Arrays.asList(arrayOfBoxCE2);
      int i1 = localList.size();
      if (i1 == 0)
      {
        BoxCE localBoxCE = new BoxCE(null, null);
        localBoxCE.setColumn(arrayOfColumnRow[l].getColumn());
        localBoxCE.setColumnSpan(k);
        localBoxCE.setRow(arrayOfColumnRow[l].getRow());
        localBoxCE.setRowSpan(j);
        localHashSet.add(localBoxCE);
      }
      else
      {
        localHashSet.addAll(localList);
      }
    }
    BoxCE[] arrayOfBoxCE1 = (BoxCE[])localHashSet.toArray(new BoxCE[localHashSet.size()]);
    Arrays.sort(arrayOfBoxCE1, new Comparator(this)
    {
      private final SE this$0;

      public int compare(, Object paramObject2)
      {
        SE.BoxCE localBoxCE1 = (SE.BoxCE)paramObject1;
        SE.BoxCE localBoxCE2 = (SE.BoxCE)paramObject2;
        int i = localBoxCE1.row - localBoxCE2.row;
        return ((i != 0) ? i : localBoxCE1.col - localBoxCE2.col);
      }
    });
    return arrayOfBoxCE1;
  }

  private void refresh_be_array_relation(BE[] paramArrayOfBE)
  {
    HashMap localHashMap = new HashMap();
    for (int i = 0; i < paramArrayOfBE.length; ++i)
      refresh_be_relation(paramArrayOfBE[i], localHashMap);
    Iterator localIterator = localHashMap.entrySet().iterator();
    while (true)
    {
      List localList;
      BEB localBEB;
      do
      {
        if (!(localIterator.hasNext()))
          return;
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        com.fr.report.CellElement localCellElement = (com.fr.report.CellElement)localEntry.getKey();
        localList = (List)localEntry.getValue();
        localBEB = getBEB5BEB2D(localCellElement.getColumn(), localCellElement.getRow(), true);
      }
      while (localBEB == null);
      BEB.access$300(localBEB, (BE[])localList.toArray(new BE[localList.size()]));
    }
  }

  private void refresh_be_relation(BE paramBE, java.util.Map paramMap)
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put(paramBE, paramBE.ce_array);
    int i = paramBE.ce_array.length;
    BE.access$400(paramBE, localHashMap, i, paramMap);
    Iterator localIterator = localHashMap.entrySet().iterator();
    while (true)
    {
      BE localBE;
      Object localObject1;
      int j;
      while (true)
      {
        do
        {
          if (!(localIterator.hasNext()))
            return;
          Map.Entry localEntry = (Map.Entry)localIterator.next();
          localBE = (BE)localEntry.getKey();
          localObject1 = localEntry.getValue();
          j = 1;
          if (!(localObject1 instanceof BE[]))
            break label334;
          localObject2 = (BE[])localObject1;
          k = (localBE.sons == null) ? 0 : localBE.sons.length;
          for (int l = 0; l < k; ++l)
          {
            BE[] arrayOfBE1 = (BE[])localHashMap.get(localBE.sons[l]);
            if (localBE.sons[l].left == localBE)
              j = 1;
            else
              j = 0;
            for (int i2 = 1; i2 < i; ++i2)
            {
              localObject2[i2].sons[l] = arrayOfBE1[i2];
              if (j != 0)
                arrayOfBE1[i2].left = localObject2[i2];
              else
                arrayOfBE1[i2].up = localObject2[i2];
            }
          }
          localObject3 = localBE.left;
          if ((localObject3 instanceof BE) && (!(localHashMap.containsKey(localObject3))))
            BE.access$500((BE)localObject3, localBE, localObject2);
          localObject3 = localBE.up;
        }
        while ((!(localObject3 instanceof BE)) || (localHashMap.containsKey(localObject3)));
        BE.access$500((BE)localObject3, localBE, localObject2);
      }
      label334: Object localObject2 = (BoxCE[])localObject1;
      int k = (localBE.sons == null) ? 0 : localBE.sons.length;
      Object localObject3 = new BE[k * i];
      for (int i1 = 0; i1 < k; ++i1)
      {
        BE[] arrayOfBE2 = (BE[])localHashMap.get(localBE.sons[i1]);
        if (localBE.sons[i1].left == localBE)
          j = 1;
        else
          j = 0;
        for (int i3 = 0; i3 < i; ++i3)
        {
          localObject3[(i3 * k + i1)] = arrayOfBE2[i3];
          if (j != 0)
            arrayOfBE2[i3].left = localObject2[i3];
          else
            arrayOfBE2[i3].up = localObject2[i3];
        }
      }
      localBE.sons = ((BE)localObject3);
    }
  }

  private void ex(Box2DCase paramBox2DCase)
  {
    HashMap localHashMap = new HashMap();
    List[] arrayOfList = cc_genealogy_hi(localHashMap);
    for (int i = 0; i < arrayOfList.length; ++i)
      ex_cc_floor(arrayOfList[i], localHashMap, paramBox2DCase);
  }

  private void ex_cc_floor(List paramList, java.util.Map paramMap, Box2DCase paramBox2DCase)
  {
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    ArrayList localArrayList3 = new ArrayList();
    int i = 0;
    int j = paramList.size();
    while (i < j)
    {
      FamilyMember localFamilyMember = (FamilyMember)paramList.get(i);
      switch (localFamilyMember.current.getCellExpandAttr().getDirection())
      {
      case 0:
        localArrayList1.add(localFamilyMember);
        break;
      case 1:
        localArrayList2.add(localFamilyMember);
        break;
      default:
        localArrayList3.add(localFamilyMember);
      }
      ++i;
    }
    ex_t2b(cc_static_ce_list(localArrayList1, paramMap, paramBox2DCase), paramBox2DCase);
    ex_l2r(cc_static_ce_list(localArrayList2, paramMap, paramBox2DCase), paramBox2DCase);
    ex_steady(cc_static_ce_list(localArrayList3, paramMap, paramBox2DCase), paramBox2DCase);
  }

  private List cc_static_ce_list(List paramList, java.util.Map paramMap, Box2DCase paramBox2DCase)
  {
    ArrayList localArrayList = new ArrayList();
    for (int i = 0; i < paramList.size(); ++i)
    {
      FamilyMember localFamilyMember = (FamilyMember)paramList.get(i);
      BE[] arrayOfBE = BEB.access$200(getBEB5BEB2D(localFamilyMember.current.getColumn(), localFamilyMember.current.getRow(), false));
      HashMap localHashMap = new HashMap();
      Rect localRect = (Rect)paramMap.get(localFamilyMember);
      for (int j = 0; j < arrayOfBE.length; ++j)
      {
        BE localBE = arrayOfBE[j];
        int k = be_column(localBE, localFamilyMember.current.getColumn(), paramBox2DCase);
        int l = be_row(localBE, localFamilyMember.current.getRow(), paramBox2DCase);
        StaticCEList localStaticCEList = (StaticCEList)localHashMap.get(ColumnRow.valueOf(k, l));
        if (localStaticCEList == null)
        {
          localStaticCEList = new StaticCEList(k, l, be_column(localBE, localRect.left, paramBox2DCase), be_row(localBE, localRect.top, paramBox2DCase), be_column(localBE, localRect.right, paramBox2DCase), be_row(localBE, localRect.bottom, paramBox2DCase));
          localHashMap.put(ColumnRow.valueOf(k, l), localStaticCEList);
          localArrayList.add(localStaticCEList);
        }
        else
        {
          System.out.println("Warning: ex_cc_floor, duplecate location:" + ColumnRow.valueOf(k, l));
        }
        StaticCEList.access$600(localStaticCEList, localBE.ce_array);
      }
    }
    return localArrayList;
  }

  private List[] cc_genealogy_hi(java.util.Map paramMap)
  {
    ArrayList localArrayList = new ArrayList();
    HashMap localHashMap = new HashMap();
    int i = 0;
    int j = this.genealogy.length;
    while (i < j)
    {
      FamilyMember[] arrayOfFamilyMember = this.genealogy[i];
      int k = 0;
      int l = arrayOfFamilyMember.length;
      while (k < l)
      {
        FamilyMember localFamilyMember = arrayOfFamilyMember[k];
        if (localFamilyMember == null)
          break label89:
        cc_member_hi(localFamilyMember, localHashMap, localArrayList);
        cc_member_rect(localFamilyMember, paramMap);
        label89: ++k;
      }
      ++i;
    }
    return ((List[])localArrayList.toArray(new List[localArrayList.size()]));
  }

  private Rect cc_member_rect(FamilyMember paramFamilyMember, java.util.Map paramMap)
  {
    Rect localRect = (Rect)paramMap.get(paramFamilyMember);
    if (localRect != null)
      return localRect;
    com.fr.report.CellElement localCellElement = paramFamilyMember.current;
    localRect = new Rect(localCellElement.getColumn(), localCellElement.getRow(), localCellElement.getColumn() + localCellElement.getColumnSpan() - 1, localCellElement.getRow() + localCellElement.getRowSpan() - 1);
    List localList = paramFamilyMember.sons;
    int i = 0;
    int j = (localList == null) ? 0 : localList.size();
    while (i < j)
    {
      localRect.union(cc_member_rect((FamilyMember)localList.get(i), paramMap));
      ++i;
    }
    paramMap.put(paramFamilyMember, localRect);
    return localRect;
  }

  private int cc_member_hi(FamilyMember paramFamilyMember, java.util.Map paramMap, List paramList)
  {
    Integer localInteger = (Integer)paramMap.get(paramFamilyMember);
    if (localInteger != null)
      return localInteger.intValue();
    int i = 0;
    if (paramFamilyMember.leftParent != null)
      i = Math.max(i, cc_member_hi(paramFamilyMember.leftParent, paramMap, paramList) + 1);
    if (paramFamilyMember.upParent != null)
      i = Math.max(i, cc_member_hi(paramFamilyMember.upParent, paramMap, paramList) + 1);
    paramMap.put(paramFamilyMember, new Integer(i));
    while (paramList.size() <= i)
      paramList.add(new ArrayList());
    ((List)paramList.get(i)).add(paramFamilyMember);
    return i;
  }

  private int be_row(BE paramBE, int paramInt, Box2DCase paramBox2DCase)
  {
    int i = paramInt;
    BoxCE localBoxCE = null;
    if (paramBE.left != null)
      localBoxCE = (BoxCE)paramBE.left;
    if ((localBoxCE == null) && (paramBE.up != null))
      localBoxCE = (BoxCE)paramBE.up;
    if (localBoxCE != null)
    {
      j = paramBox2DCase.oi_rows[localBoxCE.row];
      if (paramInt == j)
      {
        i = localBoxCE.getRow();
        break label216:
      }
      if (paramInt > j)
      {
        k = localBoxCE.row + paramInt - j;
        int l = paramBox2DCase.oi_rows.length;
        while (true)
        {
          if (k >= l)
            break label216;
          if (paramBox2DCase.oi_rows[k] == paramInt)
          {
            i = k;
            break label216:
          }
          ++k;
        }
      }
      if (paramInt >= j)
        break label216;
      int k = localBoxCE.row - j - paramInt;
      while (true)
      {
        if (k < 0)
          break label216;
        if (paramBox2DCase.oi_rows[k] == paramInt)
        {
          i = k;
          break label216:
        }
        --k;
      }
    }
    for (int j = paramInt; j < paramBox2DCase.oi_rows.length; ++j)
      if (paramBox2DCase.oi_rows[j] == paramInt)
      {
        i = j;
        break;
      }
    label216: return i;
  }

  private int be_column(BE paramBE, int paramInt, Box2DCase paramBox2DCase)
  {
    int i = paramInt;
    BoxCE localBoxCE = null;
    if (paramBE.up != null)
      localBoxCE = (BoxCE)paramBE.up;
    if ((localBoxCE == null) && (paramBE.left != null))
      localBoxCE = (BoxCE)paramBE.left;
    if (localBoxCE != null)
    {
      j = paramBox2DCase.oi_columns[localBoxCE.col];
      if (paramInt == j)
      {
        i = localBoxCE.col;
        break label216:
      }
      if (paramInt > j)
      {
        k = localBoxCE.col + paramInt - j;
        int l = paramBox2DCase.oi_columns.length;
        while (true)
        {
          if (k >= l)
            break label216;
          if (paramBox2DCase.oi_columns[k] == paramInt)
          {
            i = k;
            break label216:
          }
          ++k;
        }
      }
      if (paramInt >= j)
        break label216;
      int k = localBoxCE.col - j - paramInt;
      while (true)
      {
        if (k < 0)
          break label216;
        if (paramBox2DCase.oi_columns[k] == paramInt)
        {
          i = k;
          break label216:
        }
        --k;
      }
    }
    for (int j = paramInt; j < paramBox2DCase.oi_columns.length; ++j)
      if (paramBox2DCase.oi_columns[j] == paramInt)
      {
        i = j;
        break;
      }
    label216: return i;
  }

  private void ex_t2b(List paramList, Box2DCase paramBox2DCase)
  {
    Object localObject;
    if (paramList.size() == 0)
      return;
    StaticCEList[] arrayOfStaticCEList = (StaticCEList[])paramList.toArray(new StaticCEList[paramList.size()]);
    Arrays.sort(arrayOfStaticCEList, new Comparator(this)
    {
      private final SE this$0;

      public int compare(, Object paramObject2)
      {
        return (((SE.StaticCEList)paramObject1).gen_top - ((SE.StaticCEList)paramObject2).gen_top);
      }
    });
    int i = 0;
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    int j = 0;
    while (j < arrayOfStaticCEList.length)
    {
      localObject = new ArrayList();
      StaticCEList localStaticCEList1 = arrayOfStaticCEList[j];
      int l = localStaticCEList1.gen_bottom;
      for (StaticCEList localStaticCEList2 = localStaticCEList1; localStaticCEList2.gen_top <= l; localStaticCEList2 = arrayOfStaticCEList[j])
      {
        l = Math.max(l, localStaticCEList2.gen_bottom);
        ((List)localObject).add(localStaticCEList2);
        if (++j >= arrayOfStaticCEList.length)
          break;
      }
      i += ex_t2b_concurrent_list((List)localObject, i, localArrayList1, localArrayList2);
    }
    Box2DCase.access$700(paramBox2DCase, localArrayList1);
    for (j = 0; j < arrayOfStaticCEList.length; ++j)
    {
      localObject = arrayOfStaticCEList[j];
      for (int k = 0; k < ((StaticCEList)localObject).ce_array.length; ++k)
        paramBox2DCase.boxs2D[localObject.ce_array[k].row][localObject.ce_array[k].col] = localObject.ce_array[k];
    }
    for (j = 0; j < localArrayList2.size(); ++j)
    {
      localObject = (BoxCE)localArrayList2.get(j);
      paramBox2DCase.boxs2D[localObject.row][localObject.col] = localObject;
    }
  }

  private int ex_t2b_concurrent_list(List paramList1, int paramInt, List paramList2, List paramList3)
  {
    int i = 0;
    int j = 2147483647;
    int k = -2147483648;
    int l = 0;
    int i1 = paramList1.size();
    while (l < i1)
    {
      StaticCEList localStaticCEList1 = (StaticCEList)paramList1.get(l);
      i = Math.max(i, localStaticCEList1.ce_array.length);
      j = Math.min(j, localStaticCEList1.gen_top);
      k = Math.max(k, localStaticCEList1.gen_bottom);
      ++l;
    }
    l = k - j + 1;
    i1 = 0;
    if (i > 1)
    {
      i1 = (k - j + 1) * (i - 1);
      paramList2.add(new int[] { k + 1, j, k, i - 1 });
    }
    for (int i2 = 0; i2 < i; ++i2)
    {
      int i3 = 0;
      int i4 = paramList1.size();
      while (i3 < i4)
      {
        StaticCEList localStaticCEList2 = (StaticCEList)paramList1.get(i3);
        BoxCE localBoxCE1 = null;
        if (localStaticCEList2.ce_array.length > i2)
        {
          localBoxCE1 = localStaticCEList2.ce_array[i2];
        }
        else if (localStaticCEList2.ce_array.length > 0)
        {
          BoxCE localBoxCE2 = localStaticCEList2.ce_array[0];
          if (localBoxCE2 != null)
          {
            BE localBE = localBoxCE2.be_from;
            localBoxCE1 = new BoxCE(Primitive.NULL, localBE);
            paramList3.add(localBoxCE1);
            localBE.insert_more_ce(localBoxCE1);
            insertEmptyCE(localBE, localBoxCE1, true);
          }
        }
        int i5 = localStaticCEList2.column;
        int i6 = localStaticCEList2.row + paramInt + l * i2;
        if (localBoxCE1 != null)
        {
          localBoxCE1.row = i6;
          localBoxCE1.col = i5;
        }
        ++i3;
      }
    }
    return i1;
  }

  private void ex_l2r(List paramList, Box2DCase paramBox2DCase)
  {
    Object localObject;
    if (paramList.size() == 0)
      return;
    StaticCEList[] arrayOfStaticCEList = (StaticCEList[])paramList.toArray(new StaticCEList[paramList.size()]);
    Arrays.sort(arrayOfStaticCEList, new Comparator(this)
    {
      private final SE this$0;

      public int compare(, Object paramObject2)
      {
        return (((SE.StaticCEList)paramObject1).gen_left - ((SE.StaticCEList)paramObject2).gen_left);
      }
    });
    int i = 0;
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    int j = 0;
    while (j < arrayOfStaticCEList.length)
    {
      localObject = new ArrayList();
      StaticCEList localStaticCEList1 = arrayOfStaticCEList[j];
      int l = localStaticCEList1.gen_right;
      for (StaticCEList localStaticCEList2 = localStaticCEList1; localStaticCEList2.gen_left <= l; localStaticCEList2 = arrayOfStaticCEList[j])
      {
        l = Math.max(l, localStaticCEList2.gen_right);
        ((List)localObject).add(localStaticCEList2);
        if (++j >= arrayOfStaticCEList.length)
          break;
      }
      i += ex_l2r_concurrent_list((List)localObject, i, localArrayList1, localArrayList2);
    }
    Box2DCase.access$800(paramBox2DCase, localArrayList1);
    for (j = 0; j < arrayOfStaticCEList.length; ++j)
    {
      localObject = arrayOfStaticCEList[j];
      for (int k = 0; k < ((StaticCEList)localObject).ce_array.length; ++k)
        paramBox2DCase.boxs2D[localObject.ce_array[k].row][localObject.ce_array[k].col] = localObject.ce_array[k];
    }
    for (j = 0; j < localArrayList2.size(); ++j)
    {
      localObject = (BoxCE)localArrayList2.get(j);
      paramBox2DCase.boxs2D[localObject.row][localObject.col] = localObject;
    }
  }

  private int ex_l2r_concurrent_list(List paramList1, int paramInt, List paramList2, List paramList3)
  {
    int i = 0;
    int j = 2147483647;
    int k = -2147483648;
    int l = 0;
    int i1 = paramList1.size();
    while (l < i1)
    {
      StaticCEList localStaticCEList1 = (StaticCEList)paramList1.get(l);
      i = Math.max(i, localStaticCEList1.ce_array.length);
      j = Math.min(j, localStaticCEList1.gen_left);
      k = Math.max(k, localStaticCEList1.gen_right);
      ++l;
    }
    l = k - j + 1;
    i1 = 0;
    if (i > 1)
    {
      i1 = (k - j + 1) * (i - 1);
      paramList2.add(new int[] { k + 1, j, k, i - 1 });
    }
    for (int i2 = 0; i2 < i; ++i2)
    {
      int i3 = 0;
      int i4 = paramList1.size();
      while (i3 < i4)
      {
        StaticCEList localStaticCEList2 = (StaticCEList)paramList1.get(i3);
        BoxCE localBoxCE1 = null;
        if (localStaticCEList2.ce_array.length > i2)
        {
          localBoxCE1 = localStaticCEList2.ce_array[i2];
        }
        else if (localStaticCEList2.ce_array.length > 0)
        {
          BoxCE localBoxCE2 = localStaticCEList2.ce_array[0];
          if (localBoxCE2 != null)
          {
            BE localBE = localBoxCE2.be_from;
            localBoxCE1 = new BoxCE(Primitive.NULL, localBE);
            paramList3.add(localBoxCE1);
            localBE.insert_more_ce(localBoxCE1);
            insertEmptyCE(localBE, localBoxCE1, false);
          }
        }
        int i5 = localStaticCEList2.row;
        int i6 = localStaticCEList2.column + paramInt + l * i2;
        if (localBoxCE1 != null)
        {
          localBoxCE1.row = i5;
          localBoxCE1.col = i6;
        }
        ++i3;
      }
    }
    return i1;
  }

  private void insertEmptyCE(BE paramBE, BoxCE paramBoxCE, boolean paramBoolean)
  {
    int i;
    com.fr.report.CellElement localCellElement = paramBE.get_ce_from();
    FamilyMember localFamilyMember1 = this.genealogy[localCellElement.getRow()][localCellElement.getColumn()];
    List localList = localFamilyMember1.sons;
    if (localList != null)
      for (i = 0; i < localList.size(); ++i)
      {
        FamilyMember localFamilyMember2 = (FamilyMember)localList.get(i);
        BE localBE = null;
        if (paramBoolean)
          localBE = new BE(paramBoxCE, null);
        else
          localBE = new BE(null, paramBoxCE);
        BEB localBEB = getBEB5BEB2D(localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow(), true);
        if (localBEB != null)
        {
          BoxCE localBoxCE = new BoxCE(Primitive.NULL, localBE);
          localBE.insert_more_ce(localBoxCE);
          localBE.beb = localBEB;
          BEB.access$900(localBE.beb, localBE);
          insertEmptyCE(localBE, localBoxCE, paramBoolean);
        }
      }
  }

  private void ex_steady(List paramList, Box2DCase paramBox2DCase)
  {
    Iterator localIterator = paramList.iterator();
    while (true)
    {
      StaticCEList localStaticCEList;
      while (true)
      {
        if (!(localIterator.hasNext()))
          return;
        localStaticCEList = (StaticCEList)localIterator.next();
        if (localStaticCEList.ce_array.length != 1)
          break;
        Box2DCase.access$1000(paramBox2DCase, localStaticCEList.ce_array[0], localStaticCEList.row, localStaticCEList.column);
      }
      Box2DCase.access$1100(paramBox2DCase, localStaticCEList.ce_array, localStaticCEList.row, localStaticCEList.column);
    }
  }

  private void __getCellElementParameters(com.fr.report.CellElement paramCellElement, List paramList)
  {
    __getHighlightGParameters(paramCellElement.getHighlightGroup(), paramList);
    __getValueParameters(paramCellElement.getValue(), paramList);
  }

  private void __getHighlightGParameters(HighlightGroup paramHighlightGroup, List paramList)
  {
    if (paramHighlightGroup == null)
      return;
    int i = paramHighlightGroup.size();
    for (int j = 0; j < i; ++j)
    {
      Highlight localHighlight = paramHighlightGroup.getHighlight(j);
      if (localHighlight instanceof AbstractHighlight)
      {
        Condition localCondition = ((AbstractHighlight)localHighlight).getCondition();
        LiteConditionUtils.getAllParameters(localCondition, paramList);
      }
    }
  }

  private void __getValueParameters(Object paramObject, List paramList)
  {
    ConditionGroup[] arrayOfConditionGroup;
    int i;
    if (paramObject instanceof DSColumn)
    {
      DSColumn localDSColumn = (DSColumn)paramObject;
      LiteConditionUtils.getAllParameters(localDSColumn.getCondition(), paramList);
      if ((paramList != null) && (localDSColumn.getGrouper() instanceof CustomGrouper))
      {
        arrayOfConditionGroup = ((CustomGrouper)localDSColumn.getGrouper()).getConditionGroups();
        if (arrayOfConditionGroup != null)
          for (i = 0; i < arrayOfConditionGroup.length; ++i)
            LiteConditionUtils.getAllParameters(arrayOfConditionGroup[i].getCondition(), paramList);
      }
    }
  }

  private void __setParameterValues(List paramList)
  {
    int i = 0;
    int j = paramList.size();
    while (i < j)
    {
      Parameter localParameter = (Parameter)paramList.get(i);
      Object localObject = this.parameterMap.get(localParameter.getName());
      if (localObject != null)
        localParameter.setValue(localObject);
      ++i;
    }
  }

  private static Object cv_of_ce_array(BoxCE[] paramArrayOfBoxCE, boolean paramBoolean)
  {
    if ((paramArrayOfBoxCE == null) || (paramArrayOfBoxCE.length == 0))
      return Primitive.NULL;
    if (paramArrayOfBoxCE.length == 1)
    {
      localObject1 = paramArrayOfBoxCE[0].getValue();
      if ((!(paramBoolean)) && (localObject1 instanceof Formula))
        localObject1 = ((Formula)localObject1).getResult();
      if (localObject1 == null)
        localObject1 = Primitive.NULL;
      return localObject1;
    }
    Object localObject1 = new Object[paramArrayOfBoxCE.length];
    for (int i = 0; i < localObject1.length; ++i)
    {
      Object localObject2 = paramArrayOfBoxCE[i].getValue();
      if ((!(paramBoolean)) && (localObject2 instanceof Formula))
        localObject2 = ((Formula)localObject2).getResult();
      localObject1[i] = localObject2;
    }
    return new FArray(localObject1);
  }

  private static int[] cc_be_source(BE paramBE, TableData paramTableData)
  {
    if (paramTableData == null)
      return new int[0];
    int[] arrayOfInt1 = cc_ce_source((BoxCE)paramBE.left, paramTableData);
    int[] arrayOfInt2 = cc_ce_source((BoxCE)paramBE.up, paramTableData);
    if ((arrayOfInt1 == null) && (arrayOfInt2 == null))
      try
      {
        return IntList.range(paramTableData.getRowCount());
      }
      catch (TableDataException localTableDataException)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
        return new int[0];
      }
    if (arrayOfInt1 == null)
      return arrayOfInt2;
    if (arrayOfInt2 == null)
      return arrayOfInt1;
    return intersect_int_array(arrayOfInt1, arrayOfInt2);
  }

  private static int[] intersect_int_array(int[] paramArrayOfInt1, int[] paramArrayOfInt2)
  {
    int[] arrayOfInt1 = paramArrayOfInt1;
    int[] arrayOfInt2 = paramArrayOfInt2;
    if (paramArrayOfInt1.length < paramArrayOfInt2.length)
    {
      arrayOfInt2 = paramArrayOfInt1;
      arrayOfInt1 = paramArrayOfInt2;
    }
    Arrays.sort(arrayOfInt2);
    IntList localIntList = new IntList();
    for (int i = 0; i < arrayOfInt1.length; ++i)
    {
      int j = arrayOfInt1[i];
      if (Arrays.binarySearch(arrayOfInt2, j) >= 0)
        localIntList.add(j);
    }
    return localIntList.toArray();
  }

  private static int[] cc_ce_source(BoxCE paramBoxCE, TableData paramTableData)
  {
    if ((paramBoxCE == null) || (paramTableData == null))
      return null;
    if (!(paramBoxCE instanceof BoxCE_Extend))
      return null;
    if (paramBoxCE.be_from.sourceTableData == paramTableData)
      return ((BoxCE_Extend)paramBoxCE).rows;
    return cc_be_source(paramBoxCE.be_from, paramTableData);
  }

  private BoxCE[] resolveColumnRowRange(ColumnRowRange paramColumnRowRange)
  {
    Object localObject3;
    ColumnRowLiteral localColumnRowLiteral1 = paramColumnRowRange.getFrom();
    ColumnRowLiteral localColumnRowLiteral2 = paramColumnRowRange.getTo();
    if (localColumnRowLiteral2 == null)
      return resolveColumnRowLiteral(localColumnRowLiteral1);
    ColumnRow localColumnRow1 = localColumnRowLiteral1.getTargetColumnRow();
    ColumnRow localColumnRow2 = localColumnRowLiteral2.getTargetColumnRow();
    BoxCE[] arrayOfBoxCE1 = resolveColumnRowLiteral(localColumnRowLiteral1);
    BoxCE[] arrayOfBoxCE2 = resolveColumnRowLiteral(localColumnRowLiteral2);
    ArrayList localArrayList = new ArrayList();
    if (ComparatorUtils.equals(localColumnRow1, localColumnRow2))
    {
      HashMap localHashMap = new HashMap();
      localIntList2 = 2147483647;
      localIntList3 = -1;
      for (int i = 0; i < arrayOfBoxCE1.length; ++i)
      {
        localObject1 = arrayOfBoxCE1[i].be_from;
        localIntList2 = Math.min(localIntList2, BE.access$1200((BE)localObject1));
        localIntList3 = Math.max(localIntList3, BE.access$1200((BE)localObject1));
        if (localHashMap.containsKey(localObject1))
        {
          localIntList4 = (IntList)localHashMap.get(localObject1);
          localIntList4.add(arrayOfBoxCE1[i].result_index - 1);
        }
        else
        {
          localIntList4 = new IntList();
          localHashMap.put(localObject1, localIntList4);
          localIntList4.add(arrayOfBoxCE1[i].result_index - 1);
        }
      }
      for (i = 0; i < arrayOfBoxCE2.length; ++i)
      {
        localObject1 = arrayOfBoxCE2[i].be_from;
        localIntList2 = Math.min(localIntList2, BE.access$1200((BE)localObject1));
        localIntList3 = Math.max(localIntList3, BE.access$1200((BE)localObject1));
        if (localHashMap.containsKey(localObject1))
        {
          localIntList4 = (IntList)localHashMap.get(localObject1);
          localIntList4.add(arrayOfBoxCE2[i].result_index - 1);
        }
        else
        {
          localIntList4 = new IntList();
          localHashMap.put(localObject1, localIntList4);
          localIntList4.add(arrayOfBoxCE2[i].result_index - 1);
        }
      }
      BEB localBEB = getBEB5BEB2D(localColumnRow1.getColumn(), localColumnRow1.getRow(), true);
      if (localBEB == null)
        return new BoxCE[0];
      localObject1 = BEB.access$200(localBEB);
      localIntList4 = localIntList2;
      while (true)
      {
        if (localIntList4 > localIntList3)
          break label753;
        Object localObject2 = localObject1[localIntList4];
        if (localHashMap.containsKey(localObject2))
        {
          localObject3 = (IntList)localHashMap.get(localObject2);
          int l = 2147483647;
          int i1 = -1;
          for (int i2 = 0; i2 < ((IntList)localObject3).size(); ++i2)
          {
            l = Math.min(l, ((IntList)localObject3).get(i2));
            i1 = Math.max(i1, ((IntList)localObject3).get(i2));
          }
          i2 = l;
          while (true)
          {
            if (i2 > i1)
              break label526;
            localArrayList.add(localObject2.ce_array[i2]);
            ++i2;
          }
        }
        localArrayList.addAll(Arrays.asList(localObject2.ce_array));
        label526: ++localIntList4;
      }
    }
    IntList localIntList1 = Math.min(localColumnRow1.column, localColumnRow2.column);
    IntList localIntList2 = Math.max(localColumnRow1.column, localColumnRow2.column);
    IntList localIntList3 = Math.min(localColumnRow1.row, localColumnRow2.row);
    int j = Math.max(localColumnRow1.row, localColumnRow2.row);
    Object localObject1 = cc_columnrow_index_map_default();
    for (IntList localIntList4 = localIntList1; localIntList4 <= localIntList2; ++localIntList4)
      for (int k = localIntList3; k <= j; ++k)
      {
        localObject3 = this.report.getCellElement(localIntList4, k);
        if (localObject3 == null)
          break label741:
        if ((localIntList4 == localColumnRow1.getColumn()) && (k == localColumnRow1.getRow()))
        {
          localArrayList.addAll(Arrays.asList(arrayOfBoxCE1));
        }
        else if ((localIntList4 == localColumnRow2.getColumn()) && (k == localColumnRow2.getRow()))
        {
          localArrayList.addAll(Arrays.asList(arrayOfBoxCE2));
        }
        else
        {
          BoxCE[] arrayOfBoxCE3 = resolveColumnRow(ColumnRow.valueOf(localIntList4, k), (java.util.Map)localObject1);
          localArrayList.addAll(Arrays.asList(arrayOfBoxCE3));
        }
      }
    label741: label753: return ((BoxCE)(BoxCE)(BoxCE[])localArrayList.toArray(new BoxCE[localArrayList.size()]));
  }

  private BoxCE[] resolveColumnRowLiteral(ColumnRowLiteral paramColumnRowLiteral)
  {
    if (paramColumnRowLiteral.isPureColumnRow())
    {
      localObject = resolveColumnRowFromParentOfPE(current_cc_PE(), paramColumnRowLiteral.getTargetColumnRow());
      if (localObject != null)
        return localObject;
    }
    Object localObject = cc_columnrow_index_map_default();
    return ((BoxCE)resolveColumnRow(paramColumnRowLiteral.getTargetColumnRow(), paramColumnRowLiteral.getLeftLocation(), paramColumnRowLiteral.getUpLocation(), paramColumnRowLiteral.getCondition(), paramColumnRowLiteral.getStart(), paramColumnRowLiteral.getEnd(), (java.util.Map)localObject));
  }

  private BoxCE[] resolveColumnRowByDefaultLocation(ColumnRow paramColumnRow)
  {
    return resolveColumnRow(paramColumnRow, cc_columnrow_index_map_default());
  }

  private BoxCE[] resolveColumnRow(ColumnRow paramColumnRow, java.util.Map paramMap)
  {
    return resolveColumnRow(paramColumnRow, null, null, null, null, null, paramMap);
  }

  private BoxCE[] resolveColumnRow(ColumnRow paramColumnRow, ColumnRowLocation paramColumnRowLocation1, ColumnRowLocation paramColumnRowLocation2, ConditionalOrExpression paramConditionalOrExpression1, ConditionalOrExpression paramConditionalOrExpression2, ConditionalOrExpression paramConditionalOrExpression3, java.util.Map paramMap)
  {
    int i;
    BE[] arrayOfBE;
    Object localObject2;
    Object localObject3;
    com.fr.report.CellElement localCellElement = this.report.getCellElement(paramColumnRow.column, paramColumnRow.row);
    if (localCellElement == null)
      return new BoxCE[0];
    paramColumnRow = ColumnRow.valueOf(localCellElement.getColumn(), localCellElement.getRow());
    if (!(this.executing_columnrow_list.contains(paramColumnRow)))
      calculateCellElement(localCellElement);
    FamilyMember localFamilyMember1 = this.genealogy[localCellElement.getRow()][localCellElement.getColumn()];
    ArrayList localArrayList1 = new ArrayList();
    localArrayList1.add(paramColumnRow);
    FamilyMember localFamilyMember2 = localFamilyMember1;
    while (localFamilyMember2.leftParent != null)
    {
      localFamilyMember2 = localFamilyMember2.leftParent;
      localArrayList1.add(ColumnRow.valueOf(localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow()));
    }
    Collections.reverse(localArrayList1);
    ArrayList localArrayList2 = new ArrayList();
    localArrayList2.add(paramColumnRow);
    localFamilyMember2 = localFamilyMember1;
    while (localFamilyMember2.upParent != null)
    {
      localFamilyMember2 = localFamilyMember2.upParent;
      localArrayList2.add(ColumnRow.valueOf(localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow()));
    }
    Collections.reverse(localArrayList2);
    if ((!(advancedAnalysis)) && (((paramColumnRowLocation1 != null) || (paramColumnRowLocation2 != null))))
      throw new RuntimeException(Inter.getLocText("EX-Hierarchy_Analysis_is_not_Supported_in_this_Edition"));
    if ((paramColumnRowLocation1 != null) && (paramColumnRowLocation2 == null))
    {
      if (paramColumnRowLocation1 == ColumnRowLocation.ALL)
        break label470;
      localObject1 = paramColumnRowLocation1.getDims();
      i = 0;
      while (true)
      {
        if (i >= localObject1.length)
          break label470;
        if (localObject1[i].getColumnrow().equals(paramColumnRow))
        {
          paramColumnRowLocation2 = new ColumnRowLocation(new LocationDim[] { new LocationDim(localObject1[i].getColumnrow(), localObject1[i].getOp(), localObject1[i].getIndex()) });
          break label470:
        }
        ++i;
      }
    }
    if ((paramColumnRowLocation1 == null) && (paramColumnRowLocation2 != null) && (paramColumnRowLocation2 != ColumnRowLocation.ALL))
    {
      localObject1 = paramColumnRowLocation2.getDims();
      for (i = 0; i < localObject1.length; ++i)
        if (localObject1[i].getColumnrow().equals(paramColumnRow))
        {
          paramColumnRowLocation1 = new ColumnRowLocation(new LocationDim[] { new LocationDim(localObject1[i].getColumnrow(), localObject1[i].getOp(), localObject1[i].getIndex()) });
          break;
        }
    }
    label470: Object localObject1 = new ArrayList();
    int j = 0;
    if ((paramColumnRowLocation1 == ColumnRowLocation.ALL) && (paramColumnRowLocation2 == ColumnRowLocation.ALL))
    {
      arrayOfBE = cc_be_list_all(paramColumnRow);
    }
    else
    {
      int[] arrayOfInt;
      if ((paramColumnRowLocation1 != ColumnRowLocation.ALL) && (paramColumnRowLocation2 == ColumnRowLocation.ALL))
      {
        arrayOfInt = cc_location_columnrow_path_indexs(paramColumnRowLocation1, paramMap, localArrayList1);
        arrayOfBE = cc_be_array_from_left(arrayOfInt, cc_be_list_all(paramColumnRow));
        j = arrayOfInt[(arrayOfInt.length - 1)];
      }
      else if ((paramColumnRowLocation1 == ColumnRowLocation.ALL) && (paramColumnRowLocation2 != ColumnRowLocation.ALL))
      {
        arrayOfInt = cc_location_columnrow_path_indexs(paramColumnRowLocation2, paramMap, localArrayList2);
        arrayOfBE = cc_be_array_from_up(arrayOfInt, cc_be_list_all(paramColumnRow));
        j = arrayOfInt[(arrayOfInt.length - 1)];
      }
      else
      {
        arrayOfInt = cc_location_columnrow_path_indexs(paramColumnRowLocation1, paramMap, localArrayList1);
        localObject3 = cc_location_columnrow_path_indexs(paramColumnRowLocation2, paramMap, localArrayList2);
        arrayOfBE = cc_be_array_from_left(arrayOfInt, cc_be_list_all(paramColumnRow));
        arrayOfBE = cc_be_array_from_up(localObject3, arrayOfBE);
        j = arrayOfInt[(arrayOfInt.length - 1)];
        j = (j == 0) ? localObject3[(localObject3.length - 1)] : j;
      }
    }
    for (int k = 0; k < arrayOfBE.length; ++k)
    {
      localObject3 = arrayOfBE[k].cc_ce_array(this.calculator);
      if (j == 0)
        ((List)localObject1).addAll(Arrays.asList(localObject3));
      else if ((j > 0) && (j <= localObject3.length))
        ((List)localObject1).add(localObject3[(j - 1)]);
      else if ((j < 0) && (j + localObject3.length >= 0))
        ((List)localObject1).add(localObject3[(j + localObject3.length)]);
    }
    if (paramConditionalOrExpression1 != null)
    {
      localObject2 = new HiConNameSpace(this, cc_columnrow_index_map_default());
      this.calculator.pushNameSpace((com.fr.report.script.NameSpace)localObject2);
      localObject3 = new ArrayList();
      LinkedList localLinkedList = (LinkedList)this.calculator.getAttribute(PE_CC_LIST);
      int l = 0;
      int i1 = ((List)localObject1).size();
      while (l < i1)
      {
        BoxCE localBoxCE = (BoxCE)((List)localObject1).get(l);
        localLinkedList.add(localBoxCE);
        try
        {
          if (Boolean.TRUE.equals(paramConditionalOrExpression1.eval(this.calculator)))
            ((List)localObject3).add(localBoxCE);
        }
        catch (UtilEvalError localUtilEvalError5)
        {
          String str = "error happens at calculate formula\nformula expression is " + paramConditionalOrExpression1 + "\nerror message is " + localUtilEvalError5.getMessage();
          FRContext.getLogger().log(Level.WARNING, str, localUtilEvalError5);
        }
        localLinkedList.removeLast();
        ++l;
      }
      localObject1 = localObject3;
      this.calculator.removeNameSpace((com.fr.report.script.NameSpace)localObject2);
    }
    UtilEvalError localUtilEvalError1 = 1;
    UtilEvalError localUtilEvalError2 = -1;
    if (paramConditionalOrExpression2 != null)
      try
      {
        Object localObject4 = paramConditionalOrExpression2.eval(this.calculator);
        if (localObject4 instanceof java.lang.Number)
          localUtilEvalError2 = localUtilEvalError1 = ((java.lang.Number)localObject4).intValue();
      }
      catch (UtilEvalError localUtilEvalError3)
      {
        FRContext.getLogger().log(Level.WARNING, localUtilEvalError3.getMessage(), localUtilEvalError3);
      }
    if (paramConditionalOrExpression3 != null)
      try
      {
        Object localObject5 = paramConditionalOrExpression3.eval(this.calculator);
        if (localObject5 instanceof java.lang.Number)
          localUtilEvalError2 = ((java.lang.Number)localObject5).intValue();
      }
      catch (UtilEvalError localUtilEvalError4)
      {
        FRContext.getLogger().log(Level.WARNING, localUtilEvalError4.getMessage(), localUtilEvalError4);
      }
    if ((localUtilEvalError1 == 1) && (localUtilEvalError2 == -1))
    {
      localObject2 = localObject1;
    }
    else
    {
      if (localUtilEvalError1 < 0)
        localUtilEvalError1 = ((List)localObject1).size() + localUtilEvalError1;
      else
        --localUtilEvalError1;
      localUtilEvalError1 = Math.max(localUtilEvalError1, 0);
      if (localUtilEvalError2 < 0)
        localUtilEvalError2 = ((List)localObject1).size() + localUtilEvalError2;
      else
        --localUtilEvalError2;
      localUtilEvalError2 = Math.min(localUtilEvalError2, ((List)localObject1).size() - 1);
      localObject2 = new ArrayList();
      for (localUtilEvalError4 = localUtilEvalError1; localUtilEvalError4 <= localUtilEvalError2; ++localUtilEvalError4)
        ((List)localObject2).add(((List)localObject1).get(localUtilEvalError4));
    }
    return ((BoxCE)(BoxCE)(BoxCE)(BoxCE[])((List)localObject2).toArray(new BoxCE[((List)localObject2).size()]));
  }

  private Object resolveCRAddress(CRAddress paramCRAddress)
  {
    ColumnRow localColumnRow = paramCRAddress.getTarget();
    BoxCE localBoxCE = resolveCEParentColumnRow(localColumnRow);
    if (localBoxCE != null)
      return new Integer(BoxCE.access$1300(localBoxCE));
    return new Integer(0);
  }

  private Object resolveCRValue(ColumnRow paramColumnRow, Calculator paramCalculator)
  {
    BoxCE localBoxCE = resolveCEParentColumnRow(paramColumnRow);
    if (localBoxCE != null)
      return localBoxCE.getValue();
    return null;
  }

  private static Object fn_gmark_rebuild_result(Object[] paramArrayOfObject, int[] paramArrayOfInt, BE paramBE)
  {
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    Object localObject1 = null;
    IntList localIntList = new IntList();
    for (int i = 0; i < paramArrayOfObject.length; ++i)
    {
      Object localObject2 = paramArrayOfObject[i];
      if (i == 0)
      {
        localObject1 = localObject2;
        localArrayList1.add(localObject2);
        localIntList.add(paramArrayOfInt[i]);
      }
      else if (ComparatorUtils.equals(localObject1, localObject2))
      {
        localIntList.add(paramArrayOfInt[i]);
      }
      else
      {
        localArrayList2.add(localIntList.toArray());
        localObject1 = localObject2;
        localArrayList1.add(localObject2);
        localIntList.clear();
        localIntList.add(paramArrayOfInt[i]);
      }
    }
    localArrayList2.add(localIntList.toArray());
    if ((paramBE != null) && (paramBE.ce_array == null))
    {
      BoxCE_Extend[] arrayOfBoxCE_Extend = new BoxCE_Extend[localArrayList1.size()];
      for (int j = 0; j < arrayOfBoxCE_Extend.length; ++j)
        arrayOfBoxCE_Extend[j] = new BoxCE_Extend((int[])localArrayList2.get(j), Primitive.NULL, paramBE);
      paramBE.ce_array = arrayOfBoxCE_Extend;
    }
    return new FArray(localArrayList1);
  }

  private static Object fn_smark_rebuild_result(Object[] paramArrayOfObject, int[] paramArrayOfInt, BE paramBE)
  {
    ArrayList localArrayList = new ArrayList();
    for (int i = 0; i < paramArrayOfObject.length; ++i)
      localArrayList.add(paramArrayOfObject[i]);
    if ((paramBE != null) && (paramBE.ce_array == null))
    {
      BoxCE_Extend[] arrayOfBoxCE_Extend = new BoxCE_Extend[paramArrayOfInt.length];
      for (int j = 0; j < arrayOfBoxCE_Extend.length; ++j)
        arrayOfBoxCE_Extend[j] = new BoxCE_Extend(new int[] { paramArrayOfInt[j] }, Primitive.NULL, paramBE);
      paramBE.ce_array = arrayOfBoxCE_Extend;
    }
    return new FArray(localArrayList);
  }

  private static int fn_cc_column_index(ConditionalOrExpression paramConditionalOrExpression, TableData paramTableData, Calculator paramCalculator)
  {
    String str;
    int i = -2147483648;
    try
    {
      if (paramConditionalOrExpression != null)
      {
        Object localObject = paramConditionalOrExpression.eval(paramCalculator);
        if (localObject instanceof java.lang.Number)
        {
          i = ((java.lang.Number)localObject).intValue() - 1;
        }
        else if (localObject != null)
        {
          str = localObject.toString();
          try
          {
            int j = 0;
            int k = paramTableData.getColumnCount();
            while (j < k)
            {
              if (ComparatorUtils.tableDataColumnNameEquals(str, paramTableData.getColumnName(j)))
              {
                i = j;
                break;
              }
              ++j;
            }
          }
          catch (TableDataException localTableDataException)
          {
            FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
          }
        }
      }
    }
    catch (UtilEvalError localUtilEvalError)
    {
      str = "error happens at calculate formula\nformula expression is " + paramConditionalOrExpression + "\nerror message is " + localUtilEvalError.getMessage();
      FRContext.getLogger().log(Level.WARNING, str, localUtilEvalError);
    }
    return i;
  }

  private BoxCE resolveCEParentColumnRow(ColumnRow paramColumnRow)
  {
    BoxCE localBoxCE2;
    BoxCE localBoxCE1 = null;
    if ((localBoxCE2 = current_cc_Box()) != null)
    {
      localBoxCE1 = findCEParent(localBoxCE2, paramColumnRow);
    }
    else
    {
      PE localPE = current_cc_PE();
      if (localPE instanceof BoxCE)
        localBoxCE1 = findCEParent((BoxCE)localPE, paramColumnRow);
      else if (localPE instanceof BE)
        localBoxCE1 = findBEParent((BE)localPE, paramColumnRow);
    }
    return localBoxCE1;
  }

  private static BoxCE findBEParent(BE paramBE, ColumnRow paramColumnRow)
  {
    BoxCE localBoxCE = findCEParent((BoxCE)paramBE.left, paramColumnRow);
    if (localBoxCE != null)
      return localBoxCE;
    return findCEParent((BoxCE)paramBE.up, paramColumnRow);
  }

  private static BoxCE findCEParent(BoxCE paramBoxCE, ColumnRow paramColumnRow)
  {
    if (paramBoxCE == null)
      return null;
    BE localBE = paramBoxCE.be_from;
    com.fr.report.CellElement localCellElement = localBE.get_ce_from();
    if ((localCellElement.getColumn() == paramColumnRow.column) && (localCellElement.getRow() == paramColumnRow.row))
      return paramBoxCE;
    return findBEParent(localBE, paramColumnRow);
  }

  private java.util.Map cc_columnrow_index_map_default()
  {
    HashMap localHashMap = new HashMap();
    PE localPE = current_cc_PE();
    if (localPE instanceof BoxCE)
    {
      cc_ce_location((BoxCE)localPE, localHashMap);
      return localHashMap;
    }
    if (localPE instanceof BE)
    {
      cc_be_location((BE)localPE, localHashMap);
      return localHashMap;
    }
    BoxCE localBoxCE = current_cc_Box();
    if (localBoxCE != null)
      cc_ce_location(localBoxCE, localHashMap);
    return localHashMap;
  }

  private void cc_be_location(BE paramBE, java.util.Map paramMap)
  {
    cc_ce_location((BoxCE)paramBE.left, paramMap);
    cc_ce_location((BoxCE)paramBE.up, paramMap);
  }

  private void cc_ce_location(BoxCE paramBoxCE, java.util.Map paramMap)
  {
    if (paramBoxCE == null)
      return;
    int i = BoxCE.access$1300(paramBoxCE);
    com.fr.report.CellElement localCellElement = paramBoxCE.be_from.get_ce_from();
    paramMap.put(ColumnRow.valueOf(localCellElement.getColumn(), localCellElement.getRow()), new Integer(i));
    cc_be_location(paramBoxCE.be_from, paramMap);
  }

  private static int[] cc_location_columnrow_path_indexs(ColumnRowLocation paramColumnRowLocation, java.util.Map paramMap, List paramList)
  {
    LocationDim[] arrayOfLocationDim = (paramColumnRowLocation == null) ? new LocationDim[0] : paramColumnRowLocation.getDims();
    int i = paramList.size();
    int[] arrayOfInt = new int[i];
    int j = 0;
    int k = i;
    while (j < k)
    {
      arrayOfInt[j] = 0;
      ColumnRow localColumnRow = (ColumnRow)paramList.get(j);
      LocationDim localLocationDim = null;
      for (int l = 0; l < arrayOfLocationDim.length; ++l)
        if (arrayOfLocationDim[l].getColumnrow().equals(localColumnRow))
        {
          localLocationDim = arrayOfLocationDim[l];
          break;
        }
      Integer localInteger = (Integer)paramMap.get(localColumnRow);
      if (localLocationDim == null)
      {
        if (localInteger != null)
          arrayOfInt[j] = localInteger.intValue();
      }
      else
      {
        int i1 = (localInteger == null) ? 0 : localInteger.intValue();
        switch (localLocationDim.getOp())
        {
        case 1:
          arrayOfInt[j] = (i1 + localLocationDim.getIndex());
          break;
        case 2:
          arrayOfInt[j] = (i1 - localLocationDim.getIndex());
          break;
        default:
          if (localLocationDim.getIndex() == 0)
            arrayOfInt[j] = i1;
          else
            arrayOfInt[j] = localLocationDim.getIndex();
        }
        if (arrayOfInt[j] == 0)
          arrayOfInt[j] = 2147483647;
      }
      ++j;
    }
    return arrayOfInt;
  }

  private BE[] cc_be_array_from_left(int[] paramArrayOfInt, BE[] paramArrayOfBE)
  {
    int i = 1;
    for (int j = 0; j < paramArrayOfInt.length; ++j)
      if (paramArrayOfInt[j] != 0)
      {
        i = 0;
        break;
      }
    if (i != 0)
      return paramArrayOfBE;
    ArrayList localArrayList = new ArrayList();
    int l = 1;
    int i1 = 0;
    while (i1 < paramArrayOfBE.length)
    {
      BoxCE localBoxCE = (BoxCE)paramArrayOfBE[i1].left;
      for (int k = paramArrayOfInt.length - 2; k >= 0; --k)
      {
        if ((paramArrayOfInt[k] != 0) && (((localBoxCE == null) || ((localBoxCE.result_index != paramArrayOfInt[k]) && (localBoxCE.result_index - localBoxCE.be_from.ce_array.length - 1 != paramArrayOfInt[k])))))
        {
          l = 0;
          break;
        }
        localBoxCE = (BoxCE)localBoxCE.be_from.left;
      }
      if (l != 0)
        localArrayList.add(paramArrayOfBE[i1]);
      ++i1;
      l = 1;
    }
    return ((BE[])localArrayList.toArray(new BE[localArrayList.size()]));
  }

  private BE[] cc_be_array_from_up(int[] paramArrayOfInt, BE[] paramArrayOfBE)
  {
    int i = 1;
    for (int j = 0; j < paramArrayOfInt.length; ++j)
      if (paramArrayOfInt[j] != 0)
      {
        i = 0;
        break;
      }
    if (i != 0)
      return paramArrayOfBE;
    ArrayList localArrayList = new ArrayList();
    int l = 1;
    int i1 = 0;
    while (i1 < paramArrayOfBE.length)
    {
      BoxCE localBoxCE = (BoxCE)paramArrayOfBE[i1].up;
      for (int k = paramArrayOfInt.length - 2; k >= 0; --k)
      {
        if ((paramArrayOfInt[k] != 0) && (((localBoxCE == null) || ((localBoxCE.result_index != paramArrayOfInt[k]) && (localBoxCE.result_index - localBoxCE.be_from.ce_array.length - 1 != paramArrayOfInt[k])))))
        {
          l = 0;
          break;
        }
        localBoxCE = (BoxCE)localBoxCE.be_from.up;
      }
      if (l != 0)
        localArrayList.add(paramArrayOfBE[i1]);
      ++i1;
      l = 1;
    }
    return ((BE[])localArrayList.toArray(new BE[localArrayList.size()]));
  }

  private BE[] cc_be_list_all(ColumnRow paramColumnRow)
  {
    BEB localBEB = getBEB5BEB2D(paramColumnRow, false);
    return BEB.access$200(localBEB);
  }

  private PE current_cc_PE()
  {
    LinkedList localLinkedList = (LinkedList)this.calculator.getAttribute(PE_CC_LIST);
    if (localLinkedList.size() > 0)
      return ((PE)localLinkedList.getLast());
    return null;
  }

  private BE last_cur_cc_BE()
  {
    LinkedList localLinkedList = (LinkedList)this.calculator.getAttribute(PE_CC_LIST);
    for (int i = localLinkedList.size() - 1; i >= 0; --i)
      if (localLinkedList.get(i) instanceof BE)
        return ((BE)localLinkedList.get(i));
    return null;
  }

  private BoxCE current_cc_Box()
  {
    ColumnRow localColumnRow = this.calculator.getCurrentColumnRow();
    if (localColumnRow == null)
      return null;
    return Box2DCase.access$2300(this.boxCase, localColumnRow.row, localColumnRow.column);
  }

  private Object resolveAnDSColumn(String paramString, TableDataColumn paramTableDataColumn)
  {
    int[] arrayOfInt;
    TableData localTableData = __us_name2TableData(paramString);
    try
    {
      if ((localTableData == null) || (localTableData.getColumnCount() == 0) || (localTableData.getRowCount() == 0))
        return null;
    }
    catch (TableDataException localTableDataException1)
    {
      FRContext.getLogger().log(Level.WARNING, localTableDataException1.getMessage(), localTableDataException1);
      return null;
    }
    PE localPE = current_cc_PE();
    if ((this.calculator.getCurrentRowsTableData() != null) && (localTableData == this.calculator.getCurrentRowsTableData().getTableData()))
      arrayOfInt = this.calculator.getCurrentRowsTableData().getRows();
    else if (localPE instanceof BoxCE)
      arrayOfInt = cc_ce_source((BoxCE)localPE, localTableData);
    else
      arrayOfInt = cc_be_source((BE)localPE, localTableData);
    int i = paramTableDataColumn.getColumnIndex(localTableData, this.calculator);
    Object[] arrayOfObject = new Object[arrayOfInt.length];
    for (int j = 0; j < arrayOfInt.length; ++j)
      try
      {
        arrayOfObject[j] = localTableData.getValueAt(arrayOfInt[j], i);
      }
      catch (TableDataException localTableDataException2)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException2.getMessage(), localTableDataException2);
      }
    if (arrayOfObject.length == 0)
      return null;
    if (arrayOfObject.length == 1)
      return arrayOfObject[0];
    return new FArray(arrayOfObject);
  }

  private BoxCE[] resolveBoxColumnRow(ColumnRow paramColumnRow, BoxCE paramBoxCE)
  {
    HashMap localHashMap = new HashMap();
    if (paramBoxCE != null)
      cc_ce_location(paramBoxCE, localHashMap);
    return resolveColumnRow(paramColumnRow, localHashMap);
  }

  private static boolean isDeleted_of_ce_array(BoxCE[] paramArrayOfBoxCE)
  {
    int i = 0;
    int j = (paramArrayOfBoxCE == null) ? 0 : paramArrayOfBoxCE.length;
    while (i < j)
    {
      if (Boolean.TRUE.equals(paramArrayOfBoxCE[i].getAttribute(CellElementAttribute.DEL)))
        return true;
      ++i;
    }
    return false;
  }

  private static BoxCE[] resolveColumnRowFromParentOfPE(PE paramPE, ColumnRow paramColumnRow)
  {
    if ((paramPE == null) || (paramColumnRow == null))
      return null;
    if (paramColumnRow.equals(paramPE.getColumnRowFrom()))
      return paramPE.getResultBoxCE();
    BoxCE[] arrayOfBoxCE = resolveColumnRowFromParentOfPE(paramPE.getLeftPE(), paramColumnRow);
    if (arrayOfBoxCE == null)
      arrayOfBoxCE = resolveColumnRowFromParentOfPE(paramPE.getUpPE(), paramColumnRow);
    return arrayOfBoxCE;
  }

  private BEB getBEB5BEB2D(ColumnRow paramColumnRow, boolean paramBoolean)
  {
    return getBEB5BEB2D(paramColumnRow.column, paramColumnRow.row, paramBoolean);
  }

  private BEB getBEB5BEB2D(int paramInt1, int paramInt2, boolean paramBoolean)
  {
    BEB localBEB = null;
    if ((paramInt2 < this.rowCount) && (paramInt2 >= 0) && (paramInt1 < this.columnCount) && (paramInt1 >= 0))
      localBEB = this.be_beb_2D[paramInt2][paramInt1];
    if ((localBEB != null) || (paramBoolean))
      return localBEB;
    return new BEB(new BE[0], null);
  }

  static BoxCE[] access$000(SE paramSE, ColumnRowRange paramColumnRowRange)
  {
    return paramSE.resolveColumnRowRange(paramColumnRowRange);
  }

  static BE access$1400(SE paramSE)
  {
    return paramSE.last_cur_cc_BE();
  }

  static PE access$1500(SE paramSE)
  {
    return paramSE.current_cc_PE();
  }

  static int[] access$1600(BoxCE paramBoxCE, TableData paramTableData)
  {
    return cc_ce_source(paramBoxCE, paramTableData);
  }

  static int[] access$1700(BE paramBE, TableData paramTableData)
  {
    return cc_be_source(paramBE, paramTableData);
  }

  static Object access$1800()
  {
    return BE_CC_ROWS_MAP;
  }

  static Object access$1900(Object[] paramArrayOfObject, int[] paramArrayOfInt, BE paramBE)
  {
    return fn_gmark_rebuild_result(paramArrayOfObject, paramArrayOfInt, paramBE);
  }

  static Object access$2000(Object[] paramArrayOfObject, int[] paramArrayOfInt, BE paramBE)
  {
    return fn_smark_rebuild_result(paramArrayOfObject, paramArrayOfInt, paramBE);
  }

  static TableData access$2100(SE paramSE, BE paramBE, String paramString)
  {
    return paramSE.cc_be_source_tabledata(paramBE, paramString);
  }

  static int access$2200(ConditionalOrExpression paramConditionalOrExpression, TableData paramTableData, Calculator paramCalculator)
  {
    return fn_cc_column_index(paramConditionalOrExpression, paramTableData, paramCalculator);
  }

  static Object access$2500()
  {
    return BE_CC_SET;
  }

  static Object access$2600()
  {
    return PE_CC_LIST;
  }

  static Object access$2700()
  {
    return CUR_SE;
  }

  static BoxCE[] access$2800(SE paramSE, BE paramBE, DSColumn paramDSColumn)
  {
    return paramSE.dealWithBEDSColumn(paramBE, paramDSColumn);
  }

  static BoxCE[] access$2900(SE paramSE, BE paramBE, SubReport paramSubReport)
  {
    return paramSE.dealWithSubReport(paramBE, paramSubReport);
  }

  static BoxCE[] access$3000(SE paramSE, BE paramBE, Object paramObject)
  {
    return paramSE.dealWithBENormal(paramBE, paramObject);
  }

  static Object access$3200(BoxCE[] paramArrayOfBoxCE, boolean paramBoolean)
  {
    return cv_of_ce_array(paramArrayOfBoxCE, paramBoolean);
  }

  static ExTool access$3300(SE paramSE)
  {
    return paramSE.ex_tool;
  }

  static ChartPainter access$3500(SE paramSE, BoxCE paramBoxCE, ChartCollection paramChartCollection)
  {
    return paramSE.dealWithChart(paramBoxCE, paramChartCollection);
  }

  static int access$3700(SE paramSE)
  {
    return paramSE.rowCount;
  }

  static int access$3800(SE paramSE)
  {
    return paramSE.row_count_with_floatelem;
  }

  static int access$3900(SE paramSE)
  {
    return paramSE.columnCount;
  }

  static int access$4000(SE paramSE)
  {
    return paramSE.col_count_with_floatelem;
  }

  static BoxCE[] access$4100(SE paramSE, ColumnRow paramColumnRow)
  {
    return paramSE.resolveColumnRowByDefaultLocation(paramColumnRow);
  }

  static SEDataSetFunction access$4200(SE paramSE)
  {
    return paramSE.ds_function;
  }

  static SEDataSetFunction access$4202(SE paramSE, SEDataSetFunction paramSEDataSetFunction)
  {
    return (paramSE.ds_function = paramSEDataSetFunction);
  }

  static Object access$4400(SE paramSE, CRAddress paramCRAddress)
  {
    return paramSE.resolveCRAddress(paramCRAddress);
  }

  static Object access$4500(SE paramSE, String paramString, TableDataColumn paramTableDataColumn)
  {
    return paramSE.resolveAnDSColumn(paramString, paramTableDataColumn);
  }

  static Object access$4600(SE paramSE, ColumnRow paramColumnRow, Calculator paramCalculator)
  {
    return paramSE.resolveCRValue(paramColumnRow, paramCalculator);
  }

  static BoxCE[] access$4700(SE paramSE, ColumnRow paramColumnRow, java.util.Map paramMap)
  {
    return paramSE.resolveColumnRow(paramColumnRow, paramMap);
  }

  static Box2DCase access$4800(SE paramSE)
  {
    return paramSE.boxCase;
  }

  static FamilyMember[][] access$4900(SE paramSE)
  {
    return paramSE.genealogy;
  }

  static BEB access$5000(SE paramSE, int paramInt1, int paramInt2, boolean paramBoolean)
  {
    return paramSE.getBEB5BEB2D(paramInt1, paramInt2, paramBoolean);
  }

  static BoxCE[] access$5100(SE paramSE, ColumnRow paramColumnRow, BoxCE paramBoxCE)
  {
    return paramSE.resolveBoxColumnRow(paramColumnRow, paramBoxCE);
  }

  static WorkSheet access$5200(SE paramSE)
  {
    return paramSE.report;
  }

  static
  {
    byte[] arrayOfByte = FRCoreContext.getBytes();
    ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
    try
    {
      RSADecode.decode(arrayOfByte, localByteArrayOutputStream);
    }
    catch (Exception localException1)
    {
    }
    try
    {
      JSONObject localJSONObject = new JSONObject(new String(localByteArrayOutputStream.toByteArray(), "UTF-8"));
      advancedAnalysis = (localJSONObject.getLong("deadline") > Calendar.getInstance().getTimeInMillis()) && (localJSONObject.has("version")) && (ComparatorUtils.equals(Consts.VERSION, localJSONObject.getString("version"))) && (((localJSONObject.getLong("deadline") - Calendar.getInstance().getTimeInMillis() < 3153600000L) || ((localJSONObject.has("macaddress")) && (BaseCoreUtils.getMacAddresses().contains(localJSONObject.getString("macaddress")))))) && (VT4FR.ADVANCED_FORMULA.support());
    }
    catch (Exception localException2)
    {
    }
    CUR_SE = new Object();
    PE_CC_LIST = new Object();
    BE_CC_SET = new Object();
    BE_CC_ROWS_MAP = new Object();
  }

  private class L2RAPP extends SE.AbstractAPP
  {
    private final SE this$0;

    public L2RAPP(, boolean paramBoolean, int paramInt)
    {
      super(paramBoolean, paramInt);
      this.this$0 = paramSE;
    }

    public ColumnRow[] boxColumnRow(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      ColumnRow[] arrayOfColumnRow = new ColumnRow[this.count];
      for (int i = 0; i < this.count; ++i)
      {
        int j = (this.beforePoint) ? i : i + 1;
        arrayOfColumnRow[i] = ColumnRow.valueOf(paramRect3.right + j + paramRect2.left - paramRect4.left, paramRect1.top);
      }
      return arrayOfColumnRow;
    }

    public int boxColumn(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      return (paramRect3.right + 1 + paramRect2.left - paramRect4.left);
    }

    public int boxRow(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      return paramRect1.top;
    }

    public void insertBlank(, Rect paramRect2)
    {
      int[] arrayOfInt = IntList.range(paramRect2.left, paramRect2.right + this.count);
      SE.Box2DCase.access$5400(SE.access$4800(this.this$0), paramRect1.right + ((this.beforePoint) ? 0 : 1), arrayOfInt);
    }
  }

  private class T2BAPP extends SE.AbstractAPP
  {
    private final SE this$0;

    public T2BAPP(, boolean paramBoolean, int paramInt)
    {
      super(paramBoolean, paramInt);
      this.this$0 = paramSE;
    }

    public ColumnRow[] boxColumnRow(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      ColumnRow[] arrayOfColumnRow = new ColumnRow[this.count];
      for (int i = 0; i < this.count; ++i)
      {
        int j = (this.beforePoint) ? i : i + 1;
        arrayOfColumnRow[i] = ColumnRow.valueOf(paramRect1.left, paramRect3.bottom + (j - 1) * (paramRect4.bottom + 1 - paramRect4.top) + paramRect2.top - paramRect4.top + 1);
      }
      return arrayOfColumnRow;
    }

    public int boxColumn(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      return paramRect1.left;
    }

    public int boxRow(, Rect paramRect2, Rect paramRect3, Rect paramRect4)
    {
      return (paramRect3.bottom + 1 + paramRect2.top - paramRect4.top);
    }

    public void insertBlank(, Rect paramRect2)
    {
      int[] arrayOfInt = IntList.range(paramRect2.top, paramRect2.bottom + 1);
      SE.Box2DCase.access$5300(SE.access$4800(this.this$0), paramRect1.bottom + ((this.beforePoint) ? 0 : 1), arrayOfInt, this.count);
    }
  }

  private static abstract class AbstractAPP
    implements SE.APP
  {
    boolean beforePoint;
    int count;

    protected AbstractAPP(boolean paramBoolean, int paramInt)
    {
      this.beforePoint = paramBoolean;
      this.count = paramInt;
    }
  }

  private static abstract interface APP
  {
    public abstract void insertBlank(Rect paramRect1, Rect paramRect2);

    public abstract ColumnRow[] boxColumnRow(Rect paramRect1, Rect paramRect2, Rect paramRect3, Rect paramRect4);

    public abstract int boxColumn(Rect paramRect1, Rect paramRect2, Rect paramRect3, Rect paramRect4);

    public abstract int boxRow(Rect paramRect1, Rect paramRect2, Rect paramRect3, Rect paramRect4);
  }

  private final class Form extends PackedReport
    implements com.fr.report.core.FormReport
  {
    private static final long serialVersionUID = 8353851335987088512L;
    private final SE this$0;

    public Form(, ResultReport paramResultReport)
    {
      super(paramResultReport);
      this.this$0 = paramSE;
    }

    private SE.BoxCE[] findBaseBoxCEArray(, ColumnRow[] paramArrayOfColumnRow)
    {
      if (ArrayUtils.isEmpty(paramArrayOfColumnRow))
        return new SE.BoxCE[0];
      SE.BoxCE localBoxCE = null;
      if (ColumnRow.validate(paramColumnRow))
        localBoxCE = (SE.BoxCE)getCellElement(paramColumnRow.column, paramColumnRow.row);
      Object localObject = new SE.BoxCE[0];
      SE.BoxCE[] arrayOfBoxCE = null;
      for (int i = 0; i < paramArrayOfColumnRow.length; ++i)
      {
        if (paramArrayOfColumnRow[i] == null)
          break label93:
        arrayOfBoxCE = SE.access$5100(this.this$0, paramArrayOfColumnRow[i], localBoxCE);
        if (arrayOfBoxCE.length > localObject.length)
          localObject = arrayOfBoxCE;
      }
      label93: return ((SE.BoxCE)localObject);
    }

    public int setCurrentColumnRow(, ColumnRow paramColumnRow, Calculator paramCalculator, FormReport.Action paramAction)
      throws Exception
    {
      SE.BoxCE[] arrayOfBoxCE = findBaseBoxCEArray(paramColumnRow, paramArrayOfColumnRow);
      CalculatorNameSpace localCalculatorNameSpace = new CalculatorNameSpace(this.this$0.calculator);
      paramCalculator.pushNameSpace(localCalculatorNameSpace);
      for (int i = 0; i < arrayOfBoxCE.length; ++i)
      {
        SE.BoxCE localBoxCE = arrayOfBoxCE[i];
        this.this$0.calculator.setCurrentColumnRow(ColumnRow.valueOf(localBoxCE.getColumn(), localBoxCE.getRow()));
        paramAction.run(i, paramCalculator);
        this.this$0.calculator.setCurrentColumnRow(null);
      }
      paramCalculator.removeNameSpace(localCalculatorNameSpace);
      return arrayOfBoxCE.length;
    }

    public List getExtendedColumnRowList(, ColumnRow paramColumnRow)
    {
      SE.BoxCE[] arrayOfBoxCE1 = findBaseBoxCEArray(paramColumnRow, paramArrayOfColumnRow);
      ArrayList localArrayList = new ArrayList();
      for (int i = 0; i < arrayOfBoxCE1.length; ++i)
      {
        SE.BoxCE localBoxCE = arrayOfBoxCE1[i];
        if (localBoxCE == null)
          this.this$0.calculator.setCurrentColumnRow(null);
        else
          this.this$0.calculator.setCurrentColumnRow(ColumnRow.valueOf(localBoxCE.getColumn(), localBoxCE.getRow()));
        ColumnRow[] arrayOfColumnRow = new ColumnRow[paramArrayOfColumnRow.length];
        for (int j = 0; j < paramArrayOfColumnRow.length; ++j)
          if (paramArrayOfColumnRow[j] == null)
          {
            arrayOfColumnRow[j] = null;
          }
          else
          {
            SE.BoxCE[] arrayOfBoxCE2 = SE.access$5100(this.this$0, paramArrayOfColumnRow[j], localBoxCE);
            if (arrayOfBoxCE2.length != 1)
              arrayOfColumnRow[j] = null;
            else
              arrayOfColumnRow[j] = ColumnRow.valueOf(arrayOfBoxCE2[0].col, arrayOfBoxCE2[0].row);
          }
        localArrayList.add(arrayOfColumnRow);
      }
      return localArrayList;
    }

    public ValueVerifier[] checkValueVerifiers()
    {
      ReportWriteAttr localReportWriteAttr = SE.access$5200(this.this$0).getReportWriteAttr();
      if ((localReportWriteAttr == null) || (localReportWriteAttr.getValueVerifierCount() == 0))
        return new ValueVerifier[0];
      ArrayList localArrayList = new ArrayList();
      SheetInterval4CheckNameSpace localSheetInterval4CheckNameSpace = SheetInterval4CheckNameSpace.getInstance();
      this.this$0.calculator.pushNameSpace(localSheetInterval4CheckNameSpace);
      int i = 0;
      int j = localReportWriteAttr.getValueVerifierCount();
      while (i < j)
      {
        ValueVerifier localValueVerifier1 = localReportWriteAttr.getValueVerifier(i);
        Formula localFormula1 = localValueVerifier1.getFormula();
        if (localFormula1 == null)
          break label518:
        SE.BoxCE[] arrayOfBoxCE = findBaseBoxCEArray(null, localFormula1.getRelatedColumnRows());
        if (arrayOfBoxCE.length == 0)
          arrayOfBoxCE = new SE.BoxCE[] { null };
        for (int k = 0; k < arrayOfBoxCE.length; ++k)
        {
          SE.BoxCE localBoxCE = arrayOfBoxCE[k];
          if ((localBoxCE != null) && (Boolean.TRUE.equals(localBoxCE.getAttribute(CellElementAttribute.DEL))))
            break label512:
          if (localBoxCE == null)
            this.this$0.calculator.setCurrentColumnRow(null);
          else
            this.this$0.calculator.setCurrentColumnRow(ColumnRow.valueOf(localBoxCE.getColumn(), localBoxCE.getRow()));
          ValueVerifier localValueVerifier2 = localValueVerifier1;
          try
          {
            localValueVerifier2 = (ValueVerifier)localValueVerifier1.clone();
            localValueVerifier2.setMessage(this.this$0.calculator.getCurrentColumnRow() + "----" + localValueVerifier2.getMessage());
            try
            {
              Formula localFormula2 = localValueVerifier2.getFormula();
              Object localObject = this.this$0.calculator.eval(localFormula2.getContent().substring(1));
              if (Boolean.FALSE.equals(localObject))
              {
                localValueVerifier2.setType(1);
              }
              else if (Boolean.TRUE.equals(localObject))
              {
                localValueVerifier2.setType(0);
              }
              else
              {
                if (localObject instanceof FArray)
                {
                  FArray localFArray = (FArray)localObject;
                  localValueVerifier2.setType(0);
                  int l = 0;
                  while (true)
                  {
                    if (l >= localFArray.length())
                      break label393;
                    if (!(Boolean.TRUE.equals(localFArray.elementAt(l))))
                      localValueVerifier2.setType(1);
                    ++l;
                  }
                }
                localValueVerifier2.setType(2);
              }
            }
            catch (UtilEvalError localUtilEvalError)
            {
              localValueVerifier2.setType(2);
              localValueVerifier2.setMessage(localValueVerifier1.getMessage() + "  Parse Error: " + localUtilEvalError.getMessage());
              FRContext.getLogger().log(Level.WARNING, localValueVerifier1.getMessage() + "  Parse Error: " + localUtilEvalError.getMessage(), localUtilEvalError);
            }
          }
          catch (Exception localException)
          {
            FRContext.getLogger().log(Level.WARNING, localException.getMessage(), localException);
          }
          localArrayList.add(localValueVerifier2);
        }
        label512: label518: label393: ++i;
      }
      this.this$0.calculator.removeNameSpace(localSheetInterval4CheckNameSpace);
      return ((ValueVerifier[])localArrayList.toArray(new ValueVerifier[localArrayList.size()]));
    }

    private ColumnRow getRelativeColumnRow()
    {
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), paramColumnRow.getRow(), paramColumnRow.getColumn());
      if (localBoxCE == null)
        return null;
      this.this$0.calculator.setCurrentColumnRow(ColumnRow.valueOf(localBoxCE.getColumn(), localBoxCE.getRow()));
      Widget localWidget = localBoxCE.be_from.get_ce_from().getWidget();
      ColumnRow localColumnRow = null;
      if (localWidget instanceof AppendRowButton)
        localColumnRow = ((AppendRowButton)localWidget).getFixCell();
      else if (localWidget instanceof DeleteRowButton)
        localColumnRow = ((DeleteRowButton)localWidget).getFixCell();
      if (localColumnRow == null)
        return null;
      SE.BoxCE[] arrayOfBoxCE = SE.access$5100(this.this$0, localColumnRow, localBoxCE);
      if ((arrayOfBoxCE.length < 1) || (arrayOfBoxCE[0] == null))
        return null;
      return ColumnRow.valueOf(arrayOfBoxCE[0].col, arrayOfBoxCE[0].row);
    }

    private ColumnRow getAncestorsColumnRow()
      throws Exception
    {
      SE.PE localPE;
      int i;
      int j;
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), paramColumnRow.row, paramColumnRow.column);
      if (localBoxCE == null)
        throw new FormException(paramColumnRow + Inter.getLocText("Not_Exsit"));
      SE.BE localBE = localBoxCE.be_from;
      if (localBE.getLeftPE() != null)
      {
        localPE = localBE.getLeftPE();
        i = paramColumnRow.getColumn();
        j = paramColumnRow.getRow();
        while (true)
        {
          do
            while (true)
            {
              if (localPE == null)
                break label153;
              if (!(localPE instanceof SE.BoxCE))
                break;
              i = ((SE.BoxCE)localPE).col;
              j = ((SE.BoxCE)localPE).row;
              localPE = ((SE.BoxCE)localPE).be_from.getLeftPE();
            }
          while (!(localPE instanceof SE.BE));
          localPE = ((SE.BE)localPE).getLeftPE();
        }
        label259: label153: paramColumnRow = ColumnRow.valueOf(i, j);
      }
      else if (localBE.getUpPE() != null)
      {
        localPE = localBE.getUpPE();
        i = paramColumnRow.getColumn();
        j = paramColumnRow.getRow();
        while (true)
        {
          do
            while (true)
            {
              if (localPE == null)
                break label259;
              if (!(localPE instanceof SE.BoxCE))
                break;
              i = ((SE.BoxCE)localPE).col;
              j = ((SE.BoxCE)localPE).row;
              localPE = ((SE.BoxCE)localPE).be_from.getUpPE();
            }
          while (!(localPE instanceof SE.BE));
          localPE = ((SE.BE)localPE).getUpPE();
        }
        paramColumnRow = ColumnRow.valueOf(i, j);
      }
      return paramColumnRow;
    }

    public ColumnRow simpleAppendData(, boolean paramBoolean, int paramInt)
      throws FormException
    {
      if (paramInt <= 0)
        return null;
      ColumnRow localColumnRow = null;
      try
      {
        localColumnRow = getAncestorsColumnRow(paramColumnRow);
      }
      catch (Exception localException)
      {
      }
      return dealAddData(localColumnRow, paramBoolean, paramInt);
    }

    public ColumnRow appendData(, boolean paramBoolean, int paramInt)
      throws FormException
    {
      if (paramInt <= 0)
        return null;
      ColumnRow localColumnRow = getRelativeColumnRow(paramColumnRow);
      return dealAddData(localColumnRow, paramBoolean, paramInt);
    }

    public ColumnRow dealAddData(, boolean paramBoolean, int paramInt)
      throws FormException
    {
      if (paramColumnRow == null)
        return null;
      int i = paramColumnRow.column;
      int j = paramColumnRow.row;
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), j, i);
      if (localBoxCE == null)
        throw new FormException(paramColumnRow + Inter.getLocText("Not_Exsit"));
      com.fr.report.CellElement localCellElement = localBoxCE.be_from.get_ce_from();
      CellExpandAttr localCellExpandAttr = localCellElement.getCellExpandAttr();
      if ((localCellExpandAttr == null) || (localCellExpandAttr.getDirection() == 2))
        throw new FormException(paramColumnRow + Inter.getLocText("Not_Appendable"));
      ArrayList localArrayList1 = new ArrayList();
      ArrayList localArrayList2 = new ArrayList();
      ArrayList localArrayList3 = new ArrayList();
      co_son_box_region(localBoxCE, localArrayList3, localArrayList1, localArrayList2, true);
      if (localArrayList3.size() == 0)
        throw new FormException(Inter.getLocText("No_Element_Need_Append") + paramColumnRow);
      ColumnRow localColumnRow = null;
      switch (localCellExpandAttr.getDirection())
      {
      case 0:
        localColumnRow = app(localArrayList1, localArrayList2, localArrayList3, new SE.T2BAPP(this.this$0, paramBoolean, paramInt));
        break;
      case 1:
        localColumnRow = app(localArrayList1, localArrayList2, localArrayList3, new SE.L2RAPP(this.this$0, paramBoolean, paramInt));
      }
      this.packee = SE.Box2DCase.access$100(SE.access$4800(this.this$0), SE.access$5200(this.this$0), false, false, true, false);
      return localColumnRow;
    }

    private void co_son_box_region(, List paramList1, List paramList2, List paramList3, boolean paramBoolean)
    {
      com.fr.report.CellElement localCellElement = paramBoxCE.be_from.get_ce_from();
      if (paramBoolean)
      {
        paramList1.add(paramBoxCE);
        paramList2.add(new Rect(localCellElement.getColumn(), localCellElement.getRow(), localCellElement.getColumn() + localCellElement.getColumnSpan() - 1, localCellElement.getRow() + localCellElement.getRowSpan() - 1));
        paramList3.add(new Rect(paramBoxCE.getColumn(), paramBoxCE.getRow(), paramBoxCE.getColumn() + paramBoxCE.getColumnSpan() - 1, paramBoxCE.getRow() + paramBoxCE.getRowSpan() - 1));
      }
      FamilyMember localFamilyMember1 = SE.access$4900(this.this$0)[localCellElement.getRow()][localCellElement.getColumn()];
      List localList = localFamilyMember1.sons;
      int i = 0;
      int j = (localList == null) ? 0 : localList.size();
      while (i < j)
      {
        FamilyMember localFamilyMember2 = (FamilyMember)localList.get(i);
        SE.BEB localBEB = SE.access$5000(this.this$0, localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow(), false);
        SE.BE[] arrayOfBE = SE.BEB.access$200(localBEB);
        for (int k = 0; k < arrayOfBE.length; ++k)
        {
          SE.BE localBE = arrayOfBE[k];
          if ((localBE.left != paramBoxCE) && (localBE.up != paramBoxCE))
            break label311:
          SE.BoxCE[] arrayOfBoxCE = localBE.ce_array;
          if (arrayOfBoxCE == null)
            break label311:
          co_son_box_region(arrayOfBoxCE[(arrayOfBoxCE.length - 1)], paramList1, paramList2, paramList3, true);
        }
        label311: ++i;
      }
    }

    private ColumnRow app(, List paramList2, List paramList3, SE.APP paramAPP)
    {
      label662: Object localObject2;
      Object localObject3;
      Object localObject4;
      Rect localRect1 = new Rect(2147483647, 2147483647, -2147483648, -2147483648);
      int i = 0;
      int j = paramList1.size();
      while (i < j)
      {
        localRect1.union((Rect)paramList1.get(i));
        ++i;
      }
      Rect localRect2 = new Rect(2147483647, 2147483647, -2147483648, -2147483648);
      j = 0;
      int k = paramList2.size();
      while (j < k)
      {
        localRect2.union((Rect)paramList2.get(j));
        ++j;
      }
      paramAPP.insertBlank(localRect2, localRect1);
      int[] arrayOfInt = SE.access$4800(this.this$0).oi_columns;
      HashMap localHashMap = new HashMap();
      Object localObject1 = null;
      ArrayList localArrayList1 = new ArrayList();
      int l = 0;
      int i1 = paramList3.size();
      while (l < i1)
      {
        localObject3 = (SE.BoxCE)paramList3.get(l);
        if (localObject3 == null)
          break label662:
        localObject4 = null;
        com.fr.report.CellElement localCellElement = ((SE.BoxCE)localObject3).be_from.get_ce_from();
        if (localCellElement.getCellInsertPolicyAttr() != null)
          if (CellInsertPolicyAttr.INSERT_POLICY_COPY.equals(localCellElement.getCellInsertPolicyAttr().getInsertPolicy()))
          {
            Object localObject5 = localCellElement.getValue();
            if ((!(localObject5 instanceof DSColumn)) && (((!(localObject5 instanceof Formula)) || (((Formula)localObject5).isReserveOnWrite()))))
              try
              {
                localObject4 = BaseCoreUtils.cloneObject(localObject5);
              }
              catch (CloneNotSupportedException localCloneNotSupportedException2)
              {
                FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException2.getMessage(), localCloneNotSupportedException2);
              }
          }
          else if (CellInsertPolicyAttr.INSERT_POLICY_DEFAULT.equals(localCellElement.getCellInsertPolicyAttr().getInsertPolicy()))
          {
            localObject4 = localCellElement.getCellInsertPolicyAttr().getDefaultInsertValue();
            if (localObject4 instanceof FCloneable)
              try
              {
                localObject4 = ((FCloneable)localObject4).clone();
                if (localObject4 instanceof Formula)
                  localObject4 = ScriptUtils.executeFormula(this.this$0.calculator, (Formula)localObject4);
              }
              catch (CloneNotSupportedException localCloneNotSupportedException1)
              {
                FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException1.getMessage(), localCloneNotSupportedException1);
              }
          }
          else
          {
            localObject4 = null;
          }
        Rect localRect3 = (Rect)paramList1.get(l);
        Rect localRect4 = (Rect)paramList2.get(l);
        ColumnRow[] arrayOfColumnRow = paramAPP.boxColumnRow(localRect4, localRect3, localRect2, localRect1);
        if ((localObject1 == null) && (localCellElement.getWidget() instanceof FieldEditor) && (arrayOfColumnRow.length > 0))
          localObject1 = arrayOfColumnRow[0];
        for (int i2 = 0; i2 < arrayOfColumnRow.length; ++i2)
        {
          ArrayList localArrayList2;
          ArrayList localArrayList3;
          if (localArrayList1.size() > i2)
          {
            localObject6 = (List[])localArrayList1.get(i2);
            localArrayList2 = localObject6[0];
            localArrayList3 = localObject6[1];
          }
          else
          {
            localArrayList2 = new ArrayList();
            localArrayList3 = new ArrayList();
            localArrayList1.add(new List[] { localArrayList2, localArrayList3 });
          }
          Object localObject6 = arrayOfColumnRow[i2];
          SE.BoxCE_Insert localBoxCE_Insert = new SE.BoxCE_Insert(localObject4, null);
          SE.Box2DCase.access$1000(SE.access$4800(this.this$0), localBoxCE_Insert, ((ColumnRow)localObject6).row, ((ColumnRow)localObject6).column);
          localArrayList2.add(localObject3);
          localArrayList3.add(localBoxCE_Insert);
          if (localObject4 instanceof Formula)
            localHashMap.put(localObject6, localObject4);
        }
        ++l;
      }
      for (l = 0; l < localArrayList1.size(); ++l)
      {
        localObject2 = (List[])localArrayList1.get(l);
        localObject3 = localObject2[0];
        localObject4 = localObject2[1];
        mod_parent_son_relation((SE.BoxCE[])((List)localObject3).toArray(new SE.BoxCE[((List)localObject3).size()]), (SE.BoxCE[])((List)localObject4).toArray(new SE.BoxCE[((List)localObject3).size()]));
      }
      Iterator localIterator = localHashMap.entrySet().iterator();
      while (localIterator.hasNext())
      {
        localObject2 = (Map.Entry)localIterator.next();
        localObject3 = (ColumnRow)((Map.Entry)localObject2).getKey();
        localObject4 = (Formula)((Map.Entry)localObject2).getValue();
        ((Formula)localObject4).setContent(this.this$0.calculator.exStatement((ColumnRow)localObject3, ((Formula)localObject4).getContent().substring(1)));
      }
      return ((ColumnRow)(ColumnRow)(ColumnRow)(ColumnRow)localObject1);
    }

    public Object resolveColumnRowRange(, ColumnRow paramColumnRow)
    {
      this.this$0.calculator.setCurrentColumnRow(paramColumnRow);
      return this.this$0.calculator.resolveVariable(paramColumnRowRange);
    }

    private void mod_parent_son_relation(, SE.BoxCE[] paramArrayOfBoxCE2)
    {
      for (int i = 0; i < paramArrayOfBoxCE1.length; ++i)
      {
        SE.BE localBE;
        SE.BoxCE localBoxCE1 = paramArrayOfBoxCE1[i];
        SE.BoxCE localBoxCE2 = paramArrayOfBoxCE2[i];
        SE.BoxCE localBoxCE3 = (SE.BoxCE)localBoxCE1.be_from.left;
        SE.BoxCE localBoxCE4 = (SE.BoxCE)localBoxCE1.be_from.up;
        int j = (localBoxCE3 == null) ? -1 : Arrays.asList(paramArrayOfBoxCE1).indexOf(localBoxCE3);
        int k = (localBoxCE4 == null) ? -1 : Arrays.asList(paramArrayOfBoxCE1).indexOf(localBoxCE4);
        if ((j == -1) && (k == -1))
        {
          localBE = localBoxCE1.be_from;
        }
        else
        {
          localBE = new SE.BE(null, null);
          SE.BEB.access$900(localBoxCE1.be_from.beb, localBE);
          localBE.beb = localBoxCE1.be_from.beb;
          if (j == -1)
            localBE.left = localBoxCE3;
          else
            localBE.left = paramArrayOfBoxCE2[j];
          if (k == -1)
            localBE.up = localBoxCE4;
          else
            localBE.up = paramArrayOfBoxCE2[k];
        }
        localBoxCE2.be_from = localBE;
        localBE.insert_more_ce(localBoxCE2);
      }
    }

    public void deleteData()
      throws FormException
    {
      ColumnRow localColumnRow = getRelativeColumnRow(paramColumnRow);
      if (localColumnRow == null)
        return;
      int i = localColumnRow.column;
      int j = localColumnRow.row;
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), j, i);
      if (localBoxCE == null)
        throw new FormException(localColumnRow + Inter.getLocText("Not_Exsit"));
      changeBoxDeleteStatus(localBoxCE, true);
    }

    public void simpleDeleteData()
      throws FormException
    {
      if (paramColumnRow == null)
        return;
      int i = paramColumnRow.column;
      int j = paramColumnRow.row;
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), j, i);
      if (localBoxCE == null)
        throw new FormException(paramColumnRow + Inter.getLocText("Not_Exsit"));
      changeBoxDeleteStatus(localBoxCE, true);
    }

    public void unDeleteData()
      throws FormException
    {
      int i = paramColumnRow.column;
      int j = paramColumnRow.row;
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), j, i);
      if (localBoxCE == null)
        throw new FormException(paramColumnRow + Inter.getLocText("Not_Exsit"));
      Object localObject = localBoxCE.getAttribute(CellElementAttribute.DEL);
      if ((localObject instanceof Boolean) && (((Boolean)localObject).booleanValue()))
        changeBoxDeleteStatus(localBoxCE, false);
    }

    private void changeBoxDeleteStatus(, boolean paramBoolean)
    {
      paramBoxCE.setAttribute(CellElementAttribute.DEL, Boolean.valueOf(paramBoolean));
      for (int i = 0; i < paramBoxCE.rowSpan; ++i)
        if (paramBoolean)
          setRowHeight(paramBoxCE.row + i, 0);
        else
          setRowHeight(paramBoxCE.row + i, SE.access$5200(this.this$0).getRowHeight(paramBoxCE.row + i));
      com.fr.report.CellElement localCellElement = paramBoxCE.be_from.get_ce_from();
      FamilyMember localFamilyMember1 = SE.access$4900(this.this$0)[localCellElement.getRow()][localCellElement.getColumn()];
      List localList = localFamilyMember1.sons;
      int j = 0;
      int k = (localList == null) ? 0 : localList.size();
      while (j < k)
      {
        FamilyMember localFamilyMember2 = (FamilyMember)localList.get(j);
        SE.BEB localBEB = SE.access$5000(this.this$0, localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow(), false);
        SE.BE[] arrayOfBE = SE.BEB.access$200(localBEB);
        for (int l = 0; l < arrayOfBE.length; ++l)
        {
          SE.BE localBE = arrayOfBE[l];
          if ((localBE.left != paramBoxCE) && (localBE.up != paramBoxCE))
            break label269:
          SE.BoxCE[] arrayOfBoxCE = localBE.ce_array;
          if (arrayOfBoxCE == null)
            break label269:
          for (int i1 = 0; i1 < arrayOfBoxCE.length; ++i1)
            changeBoxDeleteStatus(arrayOfBoxCE[i1], paramBoolean);
        }
        label269: ++j;
      }
    }

    public Calculator prepare4Recalculate()
    {
      ReportHelper.clearFormulaResult(this);
      Calculator localCalculator = Calculator.createCalculator();
      SE.access$5200(this.this$0).getTemplateWorkBook().apply4Parameters(paramMap);
      localCalculator.pushNameSpace(ParameterMapNameSpace.create(paramMap));
      localCalculator.setAttribute(ScriptUtils.REC_CE_LIST, new LinkedList());
      return localCalculator;
    }

    public void setCellValue(, int paramInt2, Object paramObject)
    {
      this.packee.setCellValue(paramInt1, paramInt2, paramObject);
    }

    public Iterator cellIterator()
    {
      return this.packee.cellIterator();
    }

    public Iterator floatIterator()
    {
      return this.packee.floatIterator();
    }

    public PageSet generateReportPageSet()
    {
      return this.packee.generateReportPageSet(paramPaperSetting);
    }

    public com.fr.report.CellElement getCellElement(, int paramInt2)
    {
      return this.packee.getCellElement(paramInt1, paramInt2);
    }

    public Object getCellValue(, int paramInt2)
    {
      return this.packee.getCellValue(paramInt1, paramInt2);
    }

    public Iterator getColumn()
    {
      return this.packee.getColumn(paramInt);
    }

    public int getColumnCount()
    {
      return this.packee.getColumnCount();
    }

    public FloatElement getFloatElement()
    {
      return this.packee.getFloatElement(paramString);
    }

    public Iterator getRow()
    {
      return this.packee.getRow(paramInt);
    }

    public int getRowCount()
    {
      return this.packee.getRowCount();
    }

    public Iterator intersect(, int paramInt2, int paramInt3, int paramInt4)
    {
      return this.packee.intersect(paramInt1, paramInt2, paramInt3, paramInt4);
    }

    public void addCellElement()
    {
      throw new UnsupportedOperationException();
    }

    public void addCellElement(, boolean paramBoolean)
    {
      throw new UnsupportedOperationException();
    }

    public void removeAllCellElements()
    {
      throw new UnsupportedOperationException();
    }

    public void addFloatElement()
    {
      throw new UnsupportedOperationException();
    }

    public void bringFloatElementForward()
    {
      throw new UnsupportedOperationException();
    }

    public void bringFloatElementToFront()
    {
      throw new UnsupportedOperationException();
    }

    public void insertColumn()
    {
      throw new UnsupportedOperationException();
    }

    public void insertRow()
    {
      throw new UnsupportedOperationException();
    }

    public void merge(, int paramInt2, int paramInt3, int paramInt4)
    {
      throw new UnsupportedOperationException();
    }

    public void readXML()
    {
      throw new UnsupportedOperationException();
    }

    public void removeAllFloatElements()
    {
      throw new UnsupportedOperationException();
    }

    public boolean removeCellElement()
    {
      throw new UnsupportedOperationException();
    }

    public com.fr.report.CellElement removeCellElement(, int paramInt2)
    {
      throw new UnsupportedOperationException();
    }

    public void removeColumn()
    {
      throw new UnsupportedOperationException();
    }

    public FloatElement removeFloatElement()
    {
      throw new UnsupportedOperationException();
    }

    public boolean removeFloatElement()
    {
      throw new UnsupportedOperationException();
    }

    public void removeRow()
    {
      throw new UnsupportedOperationException();
    }

    public void sendFloatElementBackward()
    {
      throw new UnsupportedOperationException();
    }

    public void sendFloatElementToBack()
    {
      throw new UnsupportedOperationException();
    }

    public void writeXML()
    {
      throw new UnsupportedOperationException();
    }
  }

  private final class Tool4ExecutedNameSpace
    implements com.fr.report.script.NameSpace
  {
    private final SE this$0;

    private Tool4ExecutedNameSpace()
    {
      this.this$0 = paramSE;
    }

    public Object getCellElementAttribute(, Object paramObject, Calculator paramCalculator)
    {
      return null;
    }

    public Function getMethod(, Calculator paramCalculator)
    {
      return null;
    }

    public Object getVariable(, Calculator paramCalculator)
    {
      if ("$$son_range_indexlist".equals(paramObject))
      {
        ColumnRow localColumnRow = paramCalculator.getCurrentColumnRow();
        IntList localIntList = null;
        if (localColumnRow != null)
          localIntList = getColumnRowRangeRowList(localColumnRow);
        return new ArrayList();
      }
      return null;
    }

    private IntList getColumnRowRangeRowList()
    {
      IntList localIntList1 = new IntList(SE.access$4800(this.this$0).getRowCount());
      SE.BoxCE localBoxCE = SE.Box2DCase.access$2300(SE.access$4800(this.this$0), paramColumnRow.getRow(), paramColumnRow.getColumn());
      if (localBoxCE == null)
        return null;
      CellExpandAttr localCellExpandAttr = localBoxCE.be_from.get_ce_from().getCellExpandAttr();
      if ((localCellExpandAttr == null) || (localCellExpandAttr.getDirection() == 2))
        return null;
      IntList localIntList2 = new IntList();
      if ((localCellExpandAttr.getDirection() == 0) && (((localCellExpandAttr.getExtendable() == 0) || (localCellExpandAttr.getExtendable() == 1))))
      {
        resolveColumnRowRangeIndexList(localBoxCE, localIntList1, true);
        for (i = 0; i < localBoxCE.rowSpan; ++i)
          localIntList1.set(localBoxCE.row + i, 0);
        localIntList2.add(-1);
      }
      else if ((localCellExpandAttr.getDirection() == 1) && (((localCellExpandAttr.getExtendable() == 0) || (localCellExpandAttr.getExtendable() == 2))))
      {
        resolveColumnRowRangeIndexList(localBoxCE, localIntList1, false);
        for (i = 0; i < localBoxCE.colSpan; ++i)
          localIntList1.set(localBoxCE.col + i, 0);
        localIntList2.add(SE.access$4800(this.this$0).getRowCount());
      }
      else
      {
        return null;
      }
      localIntList1.sort();
      for (int i = 0; i < localIntList1.size(); ++i)
        if (localIntList1.get(i) == 1)
          localIntList2.add(i);
      return localIntList2;
    }

    private void resolveColumnRowRangeIndexList(, IntList paramIntList, boolean paramBoolean)
    {
      if (paramBoolean)
      {
        i = 0;
        while (true)
        {
          if (i >= paramBoxCE.rowSpan)
            break label108;
          while (paramIntList.size() <= paramBoxCE.row + i)
            paramIntList.add(0);
          paramIntList.set(paramBoxCE.row + i, 1);
          ++i;
        }
      }
      for (int i = 0; i < paramBoxCE.colSpan; ++i)
      {
        while (paramIntList.size() <= paramBoxCE.col + i)
          paramIntList.add(0);
        paramIntList.set(paramBoxCE.col + i, 1);
      }
      label108: com.fr.report.CellElement localCellElement = paramBoxCE.be_from.get_ce_from();
      FamilyMember localFamilyMember1 = SE.access$4900(this.this$0)[localCellElement.getRow()][localCellElement.getColumn()];
      List localList = localFamilyMember1.sons;
      int j = 0;
      int k = (localList == null) ? 0 : localList.size();
      while (j < k)
      {
        FamilyMember localFamilyMember2 = (FamilyMember)localList.get(j);
        SE.BEB localBEB = SE.access$5000(this.this$0, localFamilyMember2.current.getColumn(), localFamilyMember2.current.getRow(), false);
        SE.BE[] arrayOfBE = SE.BEB.access$200(localBEB);
        for (int l = 0; l < arrayOfBE.length; ++l)
        {
          SE.BE localBE = arrayOfBE[l];
          if ((localBE.left != paramBoxCE) && (localBE.up != paramBoxCE))
            break label310:
          SE.BoxCE[] arrayOfBoxCE = localBE.ce_array;
          if (arrayOfBoxCE == null)
            break label310:
          for (int i1 = 0; i1 < arrayOfBoxCE.length; ++i1)
            resolveColumnRowRangeIndexList(arrayOfBoxCE[i1], paramIntList, paramBoolean);
        }
        label310: ++j;
      }
    }

    Tool4ExecutedNameSpace(, SE.1 param1)
    {
      this(paramSE);
    }
  }

  private class HiConNameSpace
    implements com.fr.report.script.NameSpace
  {
    private java.util.Map default_columnrow_location_map;
    private final SE this$0;

    HiConNameSpace(, java.util.Map paramMap)
    {
      this.this$0 = paramSE;
      this.default_columnrow_location_map = paramMap;
    }

    public Function getMethod(, Calculator paramCalculator)
    {
      return null;
    }

    public Object getCellElementAttribute(, Object paramObject, Calculator paramCalculator)
    {
      return null;
    }

    public Object getVariable(, Calculator paramCalculator)
    {
      if ((paramObject instanceof String) && (((String)paramObject).matches("\\$[\\w&&\\D]+\\d+")))
        return SE.access$3200(SE.access$4700(this.this$0, ColumnRow.valueOf(((String)paramObject).substring(1)), this.default_columnrow_location_map), false);
      return null;
    }
  }

  private class LNS extends AbstractNameSpace
  {
    private com.fr.report.script.NameSpace parent;
    private final SE this$0;

    LNS(, com.fr.report.script.NameSpace paramNameSpace)
    {
      this.this$0 = paramSE;
      this.parent = paramNameSpace;
    }

    public Function getMethod(, Calculator paramCalculator)
    {
      Function localFunction = (this.parent == null) ? null : this.parent.getMethod(paramObject, paramCalculator);
      return ((localFunction == null) ? super.getMethod(paramObject, paramCalculator) : localFunction);
    }

    public Object getCellElementAttribute(, Object paramObject, Calculator paramCalculator)
    {
      Object[] arrayOfObject;
      int i;
      Object localObject = null;
      if (this.parent != null)
        localObject = this.parent.getCellElementAttribute(paramColumnRow, paramObject, paramCalculator);
      if (localObject != null)
        return localObject;
      SE.BoxCE[] arrayOfBoxCE = SE.access$4100(this.this$0, paramColumnRow);
      if (ArrayUtils.isEmpty(arrayOfBoxCE))
        return null;
      if (arrayOfBoxCE.length == 1)
      {
        localObject = arrayOfBoxCE[0].getAttribute(paramObject);
      }
      else
      {
        arrayOfObject = new Object[arrayOfBoxCE.length];
        localObject = arrayOfObject;
        for (i = 0; i < arrayOfObject.length; ++i)
          arrayOfObject[i] = arrayOfBoxCE[i].getAttribute(paramObject);
      }
      return localObject;
    }

    public Object getVariable(, Calculator paramCalculator)
    {
      Object localObject = null;
      if (this.parent != null)
        localObject = this.parent.getVariable(paramObject, paramCalculator);
      if (localObject != null)
        return localObject;
      if (paramObject instanceof ColumnRowRange)
      {
        localObject = SE.access$3200(SE.access$000(this.this$0, (ColumnRowRange)paramObject), false);
      }
      else if (paramObject instanceof DatasetFunctionCall)
      {
        if (SE.access$4200(this.this$0) == null)
          SE.access$4202(this.this$0, new SE.SEDataSetFunction(this.this$0, null));
        localObject = SE.access$4200(this.this$0).resolveDatasetFunction((DatasetFunctionCall)paramObject);
      }
      else if (paramObject instanceof CRAddress)
      {
        localObject = SE.access$4400(this.this$0, (CRAddress)paramObject);
      }
      else if (paramObject instanceof ColumnRow)
      {
        localObject = SE.access$3200(SE.access$4100(this.this$0, (ColumnRow)paramObject), false);
      }
      else if ((VT4FR.SOURCE_RELATION.support()) && (paramObject instanceof AnDSColumn))
      {
        localObject = SE.access$4500(this.this$0, ((AnDSColumn)paramObject).getDsName(), ((AnDSColumn)paramObject).getColumn());
      }
      if (localObject != null)
        return localObject;
      String str = (paramObject instanceof String) ? (String)paramObject : null;
      return resolveName(str, paramCalculator);
    }

    private Object resolveName(, Calculator paramCalculator)
    {
      if (paramString == null)
        return null;
      if (paramString.matches("\\$[\\w&&\\D]+\\d+"))
      {
        Object localObject = SE.access$4600(this.this$0, ColumnRow.valueOf(paramString.substring(1)), paramCalculator);
        if (localObject != null)
          return localObject;
      }
      return super.getVariable(paramString, paramCalculator);
    }
  }

  private final class Box2DCase
    implements CellCase
  {
    private static final long serialVersionUID = 1L;
    int[] oi_rows;
    int[] oi_columns;
    SE.BoxCE[][] boxs2D;
    private final SE this$0;

    Box2DCase(, int paramInt1, int paramInt2)
    {
      this.this$0 = paramSE;
      this.oi_rows = new int[paramInt1];
      for (int i = 0; i < paramInt1; ++i)
        this.oi_rows[i] = i;
      this.oi_columns = new int[paramInt2];
      for (int j = 0; j < paramInt2; ++j)
        this.oi_columns[j] = j;
      this.boxs2D = new SE.BoxCE[paramInt1][paramInt2];
    }

    private SE.BoxCE getBox(, int paramInt2)
    {
      if ((paramInt1 >= 0) && (paramInt1 < this.boxs2D.length) && (paramInt2 >= 0) && (paramInt2 < this.boxs2D[paramInt1].length))
        return this.boxs2D[paramInt1][paramInt2];
      return null;
    }

    private SE.BoxCE __nail(, int paramInt1, int paramInt2)
    {
      paramBoxCE.setColumn(paramInt2);
      paramBoxCE.setRow(paramInt1);
      this.boxs2D[paramInt1][paramInt2] = paramBoxCE;
      return paramBoxCE;
    }

    private SE.BoxCE __nail(, int paramInt1, int paramInt2)
    {
      int i;
      Object localObject = SE.access$3200(paramArrayOfBoxCE, true);
      SE.BoxCE localBoxCE = new SE.BoxCE(localObject, paramArrayOfBoxCE[0].be_from);
      localBoxCE.be_from.ce_array = new SE.BoxCE[] { localBoxCE };
      localBoxCE.setColumn(paramInt2);
      localBoxCE.setRow(paramInt1);
      if (localBoxCE.be_from.sons != null)
        for (i = 0; i < localBoxCE.be_from.sons.length; ++i)
        {
          SE.BE localBE = localBoxCE.be_from.sons[i];
          if ((localBE.left instanceof SE.BoxCE) && (((SE.BoxCE)localBE.left).be_from == localBoxCE.be_from))
            localBE.left = localBoxCE;
          if ((localBE.up instanceof SE.BoxCE) && (((SE.BoxCE)localBE.up).be_from == localBoxCE.be_from))
            localBE.up = localBoxCE;
        }
      this.boxs2D[paramInt1][paramInt2] = localBoxCE;
      return localBoxCE;
    }

    private void insertRows()
    {
      int[][] arrayOfInt = (int[][])paramList.toArray(new int[paramList.size()][]);
      int i = 0;
      for (int j = 0; j < arrayOfInt.length; ++j)
        i += (arrayOfInt[j][2] - arrayOfInt[j][1] + 1) * arrayOfInt[j][3];
      int[] arrayOfInt1 = this.oi_rows;
      this.oi_rows = new int[arrayOfInt1.length + i];
      SE.BoxCE[][] arrayOfBoxCE = this.boxs2D;
      this.boxs2D = new SE.BoxCE[arrayOfBoxCE.length + i][];
      int k = 0;
      int l = 0;
      for (int i1 = 0; i1 < arrayOfInt.length; ++i1)
      {
        System.arraycopy(arrayOfInt1, l, this.oi_rows, k, arrayOfInt[i1][0] - l);
        while (l < arrayOfInt[i1][0])
        {
          this.boxs2D[k] = arrayOfBoxCE[l];
          for (i2 = 0; i2 < this.boxs2D[k].length; ++i2)
            if (this.boxs2D[k][i2] != null)
              this.boxs2D[k][i2].row = k;
          ++l;
          ++k;
        }
        for (int i2 = 0; i2 < arrayOfInt[i1][3]; ++i2)
        {
          int i3 = arrayOfInt[i1][1];
          while (i3 <= arrayOfInt[i1][2])
          {
            this.oi_rows[k] = arrayOfInt1[i3];
            this.boxs2D[k] = new SE.BoxCE[this.oi_columns.length];
            ++i3;
            ++k;
          }
        }
      }
      System.arraycopy(arrayOfInt1, l, this.oi_rows, k, arrayOfInt1.length - l);
      while (l < arrayOfInt1.length)
      {
        this.boxs2D[k] = arrayOfBoxCE[l];
        for (i1 = 0; i1 < this.boxs2D[k].length; ++i1)
          if (this.boxs2D[k][i1] != null)
            this.boxs2D[k][i1].row = k;
        ++l;
        ++k;
      }
    }

    private int insertRows(, int[] paramArrayOfInt, int paramInt2)
    {
      int i = paramArrayOfInt.length * paramInt2;
      int[] arrayOfInt = this.oi_rows;
      this.oi_rows = new int[arrayOfInt.length + i];
      System.arraycopy(arrayOfInt, 0, this.oi_rows, 0, paramInt1);
      for (int j = 0; j < paramInt2; ++j)
        System.arraycopy(paramArrayOfInt, 0, this.oi_rows, paramInt1 + j * paramArrayOfInt.length, paramArrayOfInt.length);
      System.arraycopy(arrayOfInt, paramInt1, this.oi_rows, paramInt1 + i, arrayOfInt.length - paramInt1);
      SE.BoxCE[][] arrayOfBoxCE = this.boxs2D;
      this.boxs2D = new SE.BoxCE[arrayOfBoxCE.length + i][];
      System.arraycopy(arrayOfBoxCE, 0, this.boxs2D, 0, paramInt1);
      int k = paramInt1;
      int l = paramInt1 + i;
      while (k < l)
      {
        this.boxs2D[k] = new SE.BoxCE[this.oi_columns.length];
        ++k;
      }
      System.arraycopy(arrayOfBoxCE, paramInt1, this.boxs2D, paramInt1 + i, arrayOfBoxCE.length - paramInt1);
      ArrayList localArrayList = new ArrayList();
      l = paramInt1 + i;
      int i1 = this.oi_rows.length;
      while (l < i1)
      {
        for (int i2 = 0; i2 < this.boxs2D[l].length; ++i2)
          if (this.boxs2D[l][i2] != null)
            if (this.boxs2D[l][i2].rowSpan > 1)
            {
              if (this.boxs2D[l][i2].row < paramInt1)
                break label385:
              if ((!(localArrayList.contains(this.boxs2D[l][i2]))) && (this.boxs2D[l][i2].row == l - i) && (this.boxs2D[l][i2].col == i2))
              {
                this.boxs2D[l][i2].row += i;
                localArrayList.add(this.boxs2D[l][i2]);
              }
            }
            else
            {
              this.boxs2D[l][i2].row = l;
            }
        label385: ++l;
      }
      return paramArrayOfInt.length;
    }

    private void insertColumns()
    {
      int i3;
      int[][] arrayOfInt = (int[][])paramList.toArray(new int[paramList.size()][]);
      int i = 0;
      for (int j = 0; j < arrayOfInt.length; ++j)
        i += (arrayOfInt[j][2] - arrayOfInt[j][1] + 1) * arrayOfInt[j][3];
      int[] arrayOfInt1 = this.oi_columns;
      this.oi_columns = new int[arrayOfInt1.length + i];
      int k = 0;
      int l = 0;
      for (int i1 = 0; i1 < arrayOfInt.length; ++i1)
      {
        System.arraycopy(arrayOfInt1, l, this.oi_columns, k, arrayOfInt[i1][0] - l);
        k += arrayOfInt[i1][0] - l;
        l = arrayOfInt[i1][0];
        for (i2 = 0; i2 < arrayOfInt[i1][3]; ++i2)
        {
          i3 = arrayOfInt[i1][1];
          while (i3 <= arrayOfInt[i1][2])
          {
            this.oi_columns[k] = arrayOfInt1[i3];
            ++i3;
            ++k;
          }
        }
      }
      System.arraycopy(arrayOfInt1, l, this.oi_columns, k, arrayOfInt1.length - l);
      for (int i2 = 0; i2 < this.boxs2D.length; ++i2)
      {
        SE.BoxCE[] arrayOfBoxCE = this.boxs2D[i2];
        this.boxs2D[i2] = new SE.BoxCE[arrayOfInt1.length + i];
        k = 0;
        l = 0;
        for (i3 = 0; i3 < arrayOfInt.length; ++i3)
        {
          while (l < arrayOfInt[i3][0])
          {
            this.boxs2D[i2][k] = arrayOfBoxCE[l];
            if (this.boxs2D[i2][k] != null)
              this.boxs2D[i2][k].col = k;
            ++l;
            ++k;
          }
          k += arrayOfInt[i3][3] * (arrayOfInt[i3][2] - arrayOfInt[i3][1] + 1);
        }
        while (l < arrayOfBoxCE.length)
        {
          this.boxs2D[i2][k] = arrayOfBoxCE[l];
          if (this.boxs2D[i2][k] != null)
            this.boxs2D[i2][k].col = k;
          ++l;
          ++k;
        }
      }
    }

    private int insertColumns(, int[] paramArrayOfInt)
    {
      int[] arrayOfInt1 = paramArrayOfInt;
      int i = arrayOfInt1.length;
      int[] arrayOfInt2 = this.oi_columns;
      this.oi_columns = new int[arrayOfInt2.length + i];
      System.arraycopy(arrayOfInt2, 0, this.oi_columns, 0, paramInt);
      System.arraycopy(arrayOfInt1, 0, this.oi_columns, paramInt, i);
      System.arraycopy(arrayOfInt2, paramInt, this.oi_columns, paramInt + i, arrayOfInt2.length - paramInt);
      for (int j = 0; j < this.boxs2D.length; ++j)
      {
        SE.BoxCE[] arrayOfBoxCE = this.boxs2D[j];
        this.boxs2D[j] = new SE.BoxCE[arrayOfInt2.length + i];
        System.arraycopy(arrayOfBoxCE, 0, this.boxs2D[j], 0, paramInt);
        System.arraycopy(arrayOfBoxCE, paramInt, this.boxs2D[j], paramInt + i, arrayOfBoxCE.length - paramInt);
        int l = 0;
        int i1 = paramInt + i;
        int i2 = this.boxs2D[j].length;
        while (i1 < i2)
        {
          if (this.boxs2D[j][i1] != null)
            if (this.boxs2D[j][i1].colSpan > 1)
            {
              ++l;
              int k = this.boxs2D[j][i1].colSpan;
              if (l <= k)
                this.boxs2D[j][i1].col = (i1 + 1 - l);
              if (l == k)
                l = 0;
            }
            else
            {
              this.boxs2D[j][i1].col = i1;
            }
          ++i1;
        }
      }
      return paramArrayOfInt.length;
    }

    private ResultReport toReport(, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
    {
      Object localObject1;
      Object localObject2;
      PaginateReport localPaginateReport;
      RWorkSheet localRWorkSheet = new RWorkSheet();
      try
      {
        paramWorkSheet.convertWithoutCellCaseToResultReport(localRWorkSheet);
      }
      catch (CloneNotSupportedException localCloneNotSupportedException)
      {
        throw new RuntimeException(localCloneNotSupportedException);
      }
      localRWorkSheet.setCellCase(this);
      this.this$0.calculator.setAttribute(ExTool.TAG, SE.access$3300(this.this$0));
      SE.Tool4ExecutedNameSpace localTool4ExecutedNameSpace = new SE.Tool4ExecutedNameSpace(this.this$0, null);
      this.this$0.calculator.pushNameSpace(localTool4ExecutedNameSpace);
      for (int i = 0; i < this.boxs2D.length; ++i)
      {
        localObject1 = this.boxs2D[i];
        for (int k = 0; k < localObject1.length; ++k)
          if ((localObject1[k] != null) && (localObject1[k].row == i))
          {
            if (localObject1[k].col != k)
              break label164:
            box2CellElement(localObject1[k], paramBoolean2, paramBoolean3);
          }
      }
      label164: Iterator localIterator = localRWorkSheet.floatIterator();
      do
        while (true)
        {
          if (!(localIterator.hasNext()))
            break label334;
          localObject1 = (FloatElement)localIterator.next();
          ((FloatElement)localObject1).setColumn(fresh_column_index(((FloatElement)localObject1).getColumn(), true));
          ((FloatElement)localObject1).setRow(fresh_row_index(((FloatElement)localObject1).getRow(), true));
          localObject2 = ((FloatElement)localObject1).getValue();
          if (!(localObject2 instanceof ChartCollection))
            break;
          ((FloatElement)localObject1).setValue(SE.access$3500(this.this$0, null, (ChartCollection)localObject2));
        }
      while (!(localObject2 instanceof Formula));
      try
      {
        Object localObject3 = this.this$0.calculator.eval(((Formula)localObject2).getContent().substring(1));
        label334: ((FloatElement)localObject1).setValue(localObject3);
      }
      catch (UtilEvalError localUtilEvalError)
      {
        while (true)
          FRContext.getLogger().log(Level.WARNING, localUtilEvalError.getMessage(), localUtilEvalError);
        int j = 0;
        int l = this.oi_rows.length;
        while (j < l)
        {
          localRWorkSheet.setRowHeight(j, paramWorkSheet.getRowHeight(this.oi_rows[j]));
          ++j;
        }
        j = 0;
        l = this.oi_columns.length;
        while (j < l)
        {
          localRWorkSheet.setColumnWidth(j, paramWorkSheet.getColumnWidth(this.oi_columns[j]));
          ++j;
        }
        this.this$0.calculator.setCurrentReport(localRWorkSheet);
        this.this$0.calculator.setCurrentTableDataSource(paramWorkSheet.getTemplateWorkBook());
        dealWithHeaderFooter(localRWorkSheet);
        shrinktofit_postfix_if_not_cloned(localRWorkSheet, paramBoolean4, paramBoolean1);
        SEAssist.preprocessorFloatElementHyperlink(localRWorkSheet, this.this$0.calculator);
        if ((!(paramBoolean1)) && (paramWorkSheet.getWorkSheetAttr() != null) && (paramWorkSheet.getWorkSheetAttr().getDirection() != 2))
          localRWorkSheet = makeColumnBreak(localRWorkSheet, paramWorkSheet.getWorkSheetAttr());
        localRWorkSheet.recalculateCellCase();
        int[][] arrayOfInt = get_oi_rows_columns_with_float(localRWorkSheet);
        this.this$0.calculator.removeNameSpace(localTool4ExecutedNameSpace);
        localPaginateReport = new PaginateReport(localRWorkSheet, arrayOfInt[0], arrayOfInt[1]);
        if (paramBoolean1)
          return new SE.Form(this.this$0, localPaginateReport);
        localRWorkSheet.cacheCellElement(800, 1, false);
      }
      return ((ResultReport)localPaginateReport);
    }

    private void shrinktofit_postfix_if_not_cloned(, boolean paramBoolean1, boolean paramBoolean2)
    {
      SE.BoxCE[] arrayOfBoxCE1;
      int l;
      Object localObject2;
      Object localObject3;
      int i = ReportUtils.getReportSettings(paramRWorkSheet).getShrinkToFitMode();
      for (int j = 0; j < this.boxs2D.length; ++j)
      {
        arrayOfBoxCE1 = this.boxs2D[j];
        for (l = 0; l < arrayOfBoxCE1.length; ++l)
          if ((arrayOfBoxCE1[l] != null) && (arrayOfBoxCE1[l].row == j))
          {
            int i1;
            if (arrayOfBoxCE1[l].col != l)
              break label276:
            if (Boolean.TRUE.equals(arrayOfBoxCE1[l].getAttribute(CellElementAttribute.DEL)))
              for (i1 = 0; i1 < arrayOfBoxCE1[l].rowSpan; ++i1)
                paramRWorkSheet.setRowHeight(arrayOfBoxCE1[l].row + i1, 0);
            localObject2 = arrayOfBoxCE1[l].getCellGUIAttr();
            if (localObject2 == null)
            {
              if (i == 1)
                paramRWorkSheet.shrinkTOFitRowHeightForCellElement(arrayOfBoxCE1[l]);
              else if (i == 2)
                paramRWorkSheet.shrinkTOFitColumnWidthForCellElement(arrayOfBoxCE1[l]);
            }
            else if (((CellGUIAttr)localObject2).isPreviewContent())
            {
              if (!(((CellGUIAttr)localObject2).isPrintContent()))
                break label276:
              if (((i == 1) && (((CellGUIAttr)localObject2).getAdjustMode() == 3)) || (((CellGUIAttr)localObject2).getAdjustMode() == 1))
                paramRWorkSheet.shrinkTOFitRowHeightForCellElement(arrayOfBoxCE1[l]);
              else if (((i == 2) && (((CellGUIAttr)localObject2).getAdjustMode() == 3)) || (((CellGUIAttr)localObject2).getAdjustMode() == 2))
                paramRWorkSheet.shrinkTOFitColumnWidthForCellElement(arrayOfBoxCE1[l]);
            }
          }
      }
      for (j = 0; j < this.boxs2D.length; ++j)
      {
        label276: arrayOfBoxCE1 = this.boxs2D[j];
        for (l = 0; l < arrayOfBoxCE1.length; ++l)
          if ((arrayOfBoxCE1[l] != null) && (arrayOfBoxCE1[l].row == j))
          {
            if (arrayOfBoxCE1[l].col != l)
              break label418:
            localObject2 = arrayOfBoxCE1[l];
            localObject3 = (LinkedList)this.this$0.calculator.getAttribute(SE.access$2600());
            ((LinkedList)localObject3).add(localObject2);
            postfix((SE.BoxCE)localObject2);
            SEAssist.preprocessorJavaScriptParameter((com.fr.report.CellElement)localObject2, this.this$0.calculator, paramBoolean2);
            ((LinkedList)localObject3).remove(localObject2);
          }
      }
      for (int k = 0; k < this.boxs2D.length; ++k)
      {
        label418: SE.BoxCE[] arrayOfBoxCE2 = this.boxs2D[k];
        for (int i2 = 0; i2 < arrayOfBoxCE2.length; ++i2)
          if ((arrayOfBoxCE2[i2] != null) && (arrayOfBoxCE2[i2].row == k))
          {
            if (arrayOfBoxCE2[i2].col != i2)
              break label569:
            localObject3 = arrayOfBoxCE2[i2];
            if (((SE.BoxCE)localObject3).getPresent() != null)
            {
              Object localObject1 = ((SE.BoxCE)localObject3).getPresent().present(((SE.BoxCE)localObject3).getValue(), this.this$0.calculator);
              if (paramBoolean1)
              {
                ((SE.BoxCE)localObject3).setValue(localObject1);
                ((SE.BoxCE)localObject3).setPresent(null);
              }
              else
              {
                ((SE.BoxCE)localObject3).setAttribute(CellElementAttribute.PRESENT_VALUE, localObject1);
              }
            }
          }
      }
      label569:
    }

    private int[][] get_oi_rows_columns_with_float()
    {
      int k;
      int l;
      [I[] arrayOf[I = new int[2][];
      int i = 0;
      int j = 0;
      Iterator localIterator = paramRWorkSheet.floatIterator();
      while (localIterator.hasNext())
      {
        FloatElement localFloatElement = (FloatElement)localIterator.next();
        Point[] arrayOfPoint = ReportHelper.calculateLastColumnAndRowOfFloatElement(paramRWorkSheet, localFloatElement);
        i = Math.max(i, arrayOfPoint[0].x + 1);
        j = Math.max(j, arrayOfPoint[0].y + 1);
      }
      i = Math.max(this.oi_columns.length, i);
      j = Math.max(this.oi_rows.length, j);
      if (this.oi_rows.length >= j)
      {
        arrayOf[I[0] = this.oi_rows;
      }
      else
      {
        arrayOf[I[0] = new int[j];
        System.arraycopy(this.oi_rows, 0, arrayOf[I[0], 0, this.oi_rows.length);
        k = -1;
        if (this.oi_rows.length > 0)
          k = this.oi_rows[(this.oi_rows.length - 1)];
        for (l = this.oi_rows.length; l < j; ++l)
          arrayOf[I[0][l] = (k + 1 + l - this.oi_rows.length);
      }
      if (this.oi_columns.length >= i)
      {
        arrayOf[I[1] = this.oi_columns;
      }
      else
      {
        arrayOf[I[1] = new int[i];
        System.arraycopy(this.oi_columns, 0, arrayOf[I[1], 0, this.oi_columns.length);
        k = -1;
        if (this.oi_columns.length > 0)
          k = this.oi_columns[(this.oi_columns.length - 1)];
        for (l = this.oi_columns.length; l < i; ++l)
          arrayOf[I[1][l] = (k + 1 + l - this.oi_columns.length);
      }
      return arrayOf[I;
    }

    public Cell get(, int paramInt2)
    {
      if ((paramInt1 < 0) || (paramInt1 >= this.oi_columns.length) || (paramInt2 < 0) || (paramInt2 >= this.oi_rows.length))
        throw new IndexOutOfBoundsException();
      return this.boxs2D[paramInt2][paramInt1];
    }

    public void add(, boolean paramBoolean)
    {
      throw new UnsupportedOperationException();
    }

    public Cell removeCell(, int paramInt2)
    {
      throw new UnsupportedOperationException();
    }

    public void clear()
    {
      throw new UnsupportedOperationException();
    }

    public void insertRow()
    {
      throw new UnsupportedOperationException();
    }

    public int removeRow()
    {
      throw new UnsupportedOperationException();
    }

    public void insertColumn()
    {
      throw new UnsupportedOperationException();
    }

    public int removeColumn()
    {
      throw new UnsupportedOperationException();
    }

    public Iterator cellIterator()
    {
      return new CellIterator(this);
    }

    public Iterator intersect(, int paramInt2, int paramInt3, int paramInt4)
    {
      return new IntersectIterator(this, paramInt1, paramInt2, paramInt3, paramInt4, null);
    }

    public Iterator getColumn()
    {
      return new ColumnIterator(this, paramInt);
    }

    public Iterator getRow()
    {
      return new RowIterator(this, paramInt);
    }

    public int getColumnCount()
    {
      return this.oi_columns.length;
    }

    public int getRowCount()
    {
      return this.oi_rows.length;
    }

    private int getNotNullWidth()
    {
      if (this.boxs2D[paramInt] == null)
        return 0;
      for (int i = this.boxs2D[paramInt].length - 1; i >= 0; --i)
        if (this.boxs2D[paramInt][i] != null)
          return (i + 1);
      return 0;
    }

    public void recalculate()
    {
      int i = 0;
      for (int j = this.boxs2D.length - 1; j >= 0; --j)
        if (getNotNullWidth(j) != 0)
        {
          i = j;
          break;
        }
      if (i < this.oi_rows.length)
      {
        System.arraycopy(this.oi_rows, 0, this.oi_rows, 0, i);
        System.arraycopy(this.boxs2D, 0, this.boxs2D, 0, i);
      }
      j = 0;
      int k = 0;
      int l = this.boxs2D.length;
      while (k < l)
      {
        j = Math.max(j, getNotNullWidth(k));
        ++k;
      }
      if (j < this.oi_columns.length)
      {
        System.arraycopy(this.oi_columns, 0, this.oi_columns, 0, j);
        for (k = 0; k < this.boxs2D.length; ++k)
          System.arraycopy(this.boxs2D[k], 0, this.boxs2D[k], 0, j);
      }
    }

    public Object clone()
      throws CloneNotSupportedException
    {
      Box2DCase localBox2DCase = (Box2DCase)super.clone();
      localBox2DCase.boxs2D = new SE.BoxCE[this.oi_rows.length][this.oi_columns.length];
      for (int i = 0; i < localBox2DCase.boxs2D.length; ++i)
        for (int j = 0; j < localBox2DCase.boxs2D[i].length; ++j)
          if (this.boxs2D[i][j] != null)
            localBox2DCase.boxs2D[i][j] = ((SE.BoxCE)this.boxs2D[i][j].clone());
      return localBox2DCase;
    }

    private void dealWithHeaderFooter()
    {
      if (paramReport == null)
        return;
      for (int i = 0; i <= 4; ++i)
      {
        ReportHF localReportHF;
        int j;
        HFElement localHFElement;
        if (paramReport.getHeader(i) != null)
        {
          localReportHF = paramReport.getHeader(i);
          for (j = 0; j < localReportHF.getLeftList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getLeftList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getLeftList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
          for (j = 0; j < localReportHF.getCenterList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getCenterList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getCenterList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
          for (j = 0; j < localReportHF.getRightList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getRightList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getRightList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
        }
        if (paramReport.getFooter(i) != null)
        {
          localReportHF = paramReport.getFooter(i);
          for (j = 0; j < localReportHF.getLeftList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getLeftList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getLeftList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
          for (j = 0; j < localReportHF.getCenterList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getCenterList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getCenterList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
          for (j = 0; j < localReportHF.getRightList().size(); ++j)
          {
            localHFElement = (HFElement)localReportHF.getRightList().get(j);
            if (localHFElement instanceof FormulaHFElement)
              localReportHF.getRightList().set(j, dealWithFormulaHFElement((FormulaHFElement)localHFElement));
          }
        }
      }
    }

    private HFElement dealWithFormulaHFElement()
    {
      Object localObject;
      if (paramFormulaHFElement == null)
        return null;
      String str1 = paramFormulaHFElement.getFormulaContent();
      if (str1.startsWith("="))
        str1 = str1.substring(1);
      try
      {
        localObject = this.this$0.calculator.eval(str1);
      }
      catch (Exception localException)
      {
        localObject = "";
        String str2 = "error happens at calculating Report Header\nformula expression is " + str1 + "\nerror message is " + localException.getMessage();
        FRContext.getLogger().log(Level.WARNING, str2, localException);
      }
      if (localObject instanceof Image)
        return new ImageHFElement((Image)localObject);
      paramFormulaHFElement.setText(localObject.toString());
      return ((HFElement)paramFormulaHFElement);
    }

    private RWorkSheet makeColumnBreak(, WorkSheetAttr paramWorkSheetAttr)
    {
      int i2;
      int i10;
      int i20;
      int i21;
      com.fr.report.CellElement localCellElement9;
      int i = -1;
      int j = -1;
      IntList localIntList1 = new IntList();
      int k = -1;
      if (paramWorkSheetAttr.getDirection() == 0)
      {
        IntList localIntList2;
        if (paramWorkSheetAttr.getIndexsToCopy().length() > 0)
        {
          localIntList2 = IntList.toIntListDecimal(paramWorkSheetAttr.getIndexsToCopy(), ',');
          for (i2 = 0; i2 < localIntList2.size(); ++i2)
          {
            if (localIntList2.get(i2) <= 0)
              break label128:
            int i3 = localIntList2.get(i2) - 1;
            int i5 = this.oi_rows.length;
            while (i3 < i5)
            {
              if (this.oi_rows[i3] == localIntList2.get(i2) - 1)
                localIntList1.add(i3);
              ++i3;
            }
          }
        }
        if (paramWorkSheetAttr.getStartIndex() > -1)
          label128: i = fresh_row_index(paramWorkSheetAttr.getStartIndex(), true);
        else
          i = 0;
        if (paramWorkSheetAttr.getEndIndex() > -1)
          j = fresh_row_index(paramWorkSheetAttr.getEndIndex(), false);
        else
          j = paramRWorkSheet.getRowCount() - 1;
        int l = paramRWorkSheet.getColumnCount();
        if (paramWorkSheetAttr.getMaxCount() > 0)
          k = paramWorkSheetAttr.getMaxCount();
        else if (paramWorkSheetAttr.getCount() > 0)
          k = (j - i) / paramWorkSheetAttr.getCount() + 1;
        i2 = (j - i) / k + 1;
        if (k > 0)
        {
          RWorkSheet localRWorkSheet1;
          Object localObject1;
          try
          {
            localRWorkSheet1 = paramRWorkSheet.cloneWithoutCell();
          }
          catch (CloneNotSupportedException localCloneNotSupportedException1)
          {
            localRWorkSheet1 = new RWorkSheet();
            FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException1.getMessage(), localCloneNotSupportedException1);
          }
          localRWorkSheet1.setCellCase(new DefaultCellCase());
          for (int i6 = 1; i6 < i2; ++i6)
            for (int i9 = 0; i9 < l; ++i9)
              localRWorkSheet1.setColumnWidth(i9 + i6 * l, paramRWorkSheet.getColumnWidth(i9));
          Iterator localIterator1 = paramRWorkSheet.cellIterator();
          while (true)
          {
            com.fr.report.CellElement localCellElement1;
            int i12;
            label457: int i18;
            do
            {
              if (!(localIterator1.hasNext()))
                break label929;
              localCellElement1 = (com.fr.report.CellElement)localIterator1.next();
              if (localCellElement1.getRow() < i)
              {
                if (localIntList1.contain(localCellElement1.getRow()))
                {
                  i12 = 0;
                  while (true)
                  {
                    if (i12 >= i2)
                      break label457;
                    com.fr.report.CellElement localCellElement3 = localCellElement1.deriveCellElement(localCellElement1.getColumn() + i12 * l, localCellElement1.getRow());
                    localRWorkSheet1.addCellElement(localCellElement3);
                    ++i12;
                  }
                }
                localRWorkSheet1.addCellElement(localCellElement1);
              }
              if ((localCellElement1.getRow() >= i) && (localCellElement1.getRow() <= j))
              {
                i12 = (localCellElement1.getRow() - i) / k;
                int i14 = (localCellElement1.getRow() + localCellElement1.getRowSpan() - 1 - i) / k;
                if (i12 >= i14)
                {
                  com.fr.report.CellElement localCellElement7 = localCellElement1.deriveCellElement(localCellElement1.getColumn() + i12 * l, i + (localCellElement1.getRow() - i) % k);
                  localRWorkSheet1.addCellElement(localCellElement7);
                }
                else
                {
                  i18 = localCellElement1.getRow();
                  for (i20 = i12; i20 <= i14; ++i20)
                    if (localCellElement1.getRow() + localCellElement1.getRowSpan() > i + (i20 + 1) * k)
                    {
                      i21 = k - (i18 - i) % k;
                      localCellElement9 = localCellElement1.deriveCellElement(localCellElement1.getColumn() + i20 * l, i + (i18 - i) % k, localCellElement1.getColumnSpan(), i21);
                      localRWorkSheet1.addCellElement(localCellElement9);
                      i18 = i + (i20 + 1) * k;
                    }
                    else
                    {
                      i21 = localCellElement1.getRow() + localCellElement1.getRowSpan() - i18;
                      localCellElement9 = localCellElement1.deriveCellElement(localCellElement1.getColumn() + i20 * l, i + (i18 - i) % k, localCellElement1.getColumnSpan(), i21);
                      localRWorkSheet1.addCellElement(localCellElement9);
                    }
                }
              }
            }
            while (localCellElement1.getRow() <= j);
            localRWorkSheet1.setRowHeight(localCellElement1.getRow() - j - 1 + i + k, paramRWorkSheet.getRowHeight(localCellElement1.getRow()));
            if (localIntList1.contain(localCellElement1.getRow()))
            {
              i12 = 0;
              while (true)
              {
                if (i12 >= i2);
                com.fr.report.CellElement localCellElement4 = localCellElement1.deriveCellElement(localCellElement1.getColumn() + i12 * l, localCellElement1.getRow() - j - 1 + i + k);
                localRWorkSheet1.addCellElement(localCellElement4);
                ++i12;
              }
            }
            localObject1 = localCellElement1.deriveCellElement(localCellElement1.getColumn(), localCellElement1.getRow() - j - 1 + i + k);
            localRWorkSheet1.addCellElement((com.fr.report.CellElement)localObject1);
          }
          if (((j - i + 1) % k != 0) && (paramWorkSheetAttr.isShowBlank()))
            for (i10 = 0; i10 < l; ++i10)
            {
              try
              {
                if (paramRWorkSheet.getCellElement(i10, j) == null)
                  label929: break label1078:
                localObject1 = (com.fr.report.CellElement)paramRWorkSheet.getCellElement(i10, j).clone();
                ((com.fr.report.CellElement)localObject1).setValue(null);
              }
              catch (CloneNotSupportedException localCloneNotSupportedException3)
              {
                localObject1 = new DefaultCellElement();
                FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException3.getMessage(), localCloneNotSupportedException3);
              }
              for (int i15 = (j - i + 1) % k; i15 < k; ++i15)
                localRWorkSheet1.addCellElement(((com.fr.report.CellElement)localObject1).deriveCellElement(i10 + (i2 - 1) * l, i15 + i));
            }
          label1202: label1078: label2003: label2152: label1531: paramRWorkSheet = localRWorkSheet1;
        }
      }
      else if (paramWorkSheetAttr.getDirection() == 1)
      {
        IntList localIntList3;
        if (paramWorkSheetAttr.getIndexsToCopy().length() > 0)
        {
          localIntList3 = IntList.toIntListDecimal(paramWorkSheetAttr.getIndexsToCopy(), ',');
          for (i2 = 0; i2 < localIntList1.size(); ++i2)
          {
            if (localIntList3.get(i2) <= 0)
              break label1202:
            int i4 = localIntList3.get(i2) - 1;
            int i7 = this.oi_columns.length;
            while (i4 < i7)
            {
              if (this.oi_columns[i4] == localIntList3.get(i2) - 1)
                localIntList1.add(i4);
              ++i4;
            }
          }
        }
        if (paramWorkSheetAttr.getStartIndex() > -1)
          i = fresh_column_index(paramWorkSheetAttr.getStartIndex(), true);
        else
          i = 0;
        if (paramWorkSheetAttr.getEndIndex() > -1)
          j = fresh_column_index(paramWorkSheetAttr.getEndIndex(), false);
        else
          j = paramRWorkSheet.getColumnCount() - 1;
        int i1 = paramRWorkSheet.getRowCount();
        if (paramWorkSheetAttr.getMaxCount() > 0)
          k = paramWorkSheetAttr.getMaxCount();
        else if (paramWorkSheetAttr.getCount() > 0)
          k = (j - i) / paramWorkSheetAttr.getCount() + 1;
        i2 = (j - i) / k + 1;
        if (k > 0)
        {
          RWorkSheet localRWorkSheet2;
          int i11;
          Object localObject2;
          try
          {
            localRWorkSheet2 = paramRWorkSheet.cloneWithoutCell();
          }
          catch (CloneNotSupportedException localCloneNotSupportedException2)
          {
            localRWorkSheet2 = new RWorkSheet();
            FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException2.getMessage(), localCloneNotSupportedException2);
          }
          localRWorkSheet2.setCellCase(new DefaultCellCase());
          for (int i8 = 1; i8 < i2; ++i8)
            for (i10 = 0; i10 < i1; ++i10)
              localRWorkSheet2.setRowHeight(i10 + i8 * i1, paramRWorkSheet.getRowHeight(i10));
          Iterator localIterator2 = paramRWorkSheet.cellIterator();
          while (true)
          {
            com.fr.report.CellElement localCellElement2;
            int i13;
            int i19;
            do
            {
              if (!(localIterator2.hasNext()))
                break label2003;
              localCellElement2 = (com.fr.report.CellElement)localIterator2.next();
              if (localCellElement2.getColumn() < i)
              {
                if (localIntList1.contain(localCellElement2.getColumn()))
                {
                  i13 = 0;
                  while (true)
                  {
                    if (i13 >= i2)
                      break label1531;
                    com.fr.report.CellElement localCellElement5 = localCellElement2.deriveCellElement(localCellElement2.getColumn(), localCellElement2.getRow() + i13 * i1);
                    localRWorkSheet2.addCellElement(localCellElement5);
                    ++i13;
                  }
                }
                localRWorkSheet2.addCellElement(localCellElement2);
              }
              if ((localCellElement2.getColumn() >= i) && (localCellElement2.getColumn() <= j))
              {
                i13 = (localCellElement2.getColumn() - i) / k;
                int i16 = (localCellElement2.getColumn() + localCellElement2.getColumnSpan() - 1 - i) / k;
                if (i13 >= i16)
                {
                  com.fr.report.CellElement localCellElement8 = localCellElement2.deriveCellElement(i + (localCellElement2.getColumn() - i) % k, localCellElement2.getRow() + i13 * i1);
                  localRWorkSheet2.addCellElement(localCellElement8);
                }
                else
                {
                  i19 = localCellElement2.getColumn();
                  for (i20 = i13; i20 <= i16; ++i20)
                    if (localCellElement2.getColumn() + localCellElement2.getColumnSpan() > i + (i20 + 1) * k)
                    {
                      i21 = k - (i19 - i) % k;
                      localCellElement9 = localCellElement2.deriveCellElement(i + (i19 - i) % k, localCellElement2.getRow() + i20 * i1, i21, localCellElement2.getRowSpan());
                      localRWorkSheet2.addCellElement(localCellElement9);
                      i19 = i + (i20 + 1) * k;
                    }
                    else
                    {
                      i21 = localCellElement2.getColumn() + localCellElement2.getColumnSpan() - i19;
                      localCellElement9 = localCellElement2.deriveCellElement(i + (i19 - i) % k, localCellElement2.getRow() + i20 * i1, i21, localCellElement2.getRowSpan());
                      localRWorkSheet2.addCellElement(localCellElement9);
                    }
                }
              }
            }
            while (localCellElement2.getColumn() <= j);
            localRWorkSheet2.setColumnWidth(localCellElement2.getColumn() - j + i - 1 + k, paramRWorkSheet.getColumnWidth(localCellElement2.getColumn()));
            if (localIntList1.contain(localCellElement2.getColumn()))
            {
              i13 = 0;
              while (true)
              {
                if (i13 >= i2);
                com.fr.report.CellElement localCellElement6 = localCellElement2.deriveCellElement(localCellElement2.getColumn() - j + i - 1 + k, localCellElement2.getRow() + i13 * i1);
                localRWorkSheet2.addCellElement(localCellElement6);
                ++i13;
              }
            }
            localObject2 = localCellElement2.deriveCellElement(localCellElement2.getColumn() - j + i - 1 + k, localCellElement2.getRow());
            localRWorkSheet2.addCellElement((com.fr.report.CellElement)localObject2);
          }
          if (((j - i + 1) % k != 0) && (paramWorkSheetAttr.isShowBlank()))
            for (i11 = 0; i11 < i1; ++i11)
            {
              try
              {
                if (paramRWorkSheet.getCellElement(j, i11) == null)
                  break label2152:
                localObject2 = (com.fr.report.CellElement)paramRWorkSheet.getCellElement(j, i11).clone();
                ((com.fr.report.CellElement)localObject2).setValue(null);
              }
              catch (CloneNotSupportedException localCloneNotSupportedException4)
              {
                localObject2 = new DefaultCellElement();
                FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException4.getMessage(), localCloneNotSupportedException4);
              }
              for (int i17 = (j - i + 1) % k; i17 < k; ++i17)
                localRWorkSheet2.addCellElement(((com.fr.report.CellElement)localObject2).deriveCellElement(i17 + i, i11 + (i2 - 1) * i1));
            }
          paramRWorkSheet = localRWorkSheet2;
        }
      }
      return ((RWorkSheet)(RWorkSheet)paramRWorkSheet);
    }

    private int fresh_row_index(, boolean paramBoolean)
    {
      if (paramInt < 0)
        return paramInt;
      int i = paramInt;
      int j = paramInt;
      int k = this.oi_rows.length;
      while (j < k)
      {
        if (this.oi_rows[j] == paramInt)
        {
          i = j;
          if (paramBoolean)
            break;
        }
        ++j;
      }
      if ((this.oi_rows.length > 0) && (paramInt >= SE.access$3700(this.this$0)))
      {
        j = this.oi_rows[(this.oi_rows.length - 1)];
        for (k = 0; k < SE.access$3800(this.this$0) - SE.access$3700(this.this$0); ++k)
          if (++j == paramInt)
          {
            i = this.oi_rows.length + k;
            if (paramBoolean)
              break;
          }
      }
      return i;
    }

    private int fresh_column_index(, boolean paramBoolean)
    {
      if (paramInt < 0)
        return paramInt;
      int i = paramInt;
      int j = paramInt;
      int k = this.oi_columns.length;
      while (j < k)
      {
        if (this.oi_columns[j] == paramInt)
        {
          i = j;
          if (paramBoolean)
            break;
        }
        ++j;
      }
      if ((this.oi_columns.length > 0) && (paramInt >= SE.access$3900(this.this$0)))
      {
        j = this.oi_columns[(this.oi_columns.length - 1)];
        for (k = 0; k < SE.access$4000(this.this$0) - SE.access$3900(this.this$0); ++k)
          if (++j == paramInt)
          {
            i = this.oi_columns.length + k;
            if (paramBoolean)
              break;
          }
      }
      return i;
    }

    private void box2CellElement(, boolean paramBoolean1, boolean paramBoolean2)
    {
      int i5;
      Object localObject2;
      int i6;
      Object localObject3;
      Object localObject4;
      com.fr.report.CellElement localCellElement = paramBoxCE.be_from.get_ce_from();
      int i = localCellElement.getRowSpan();
      int j = localCellElement.getColumnSpan();
      int k = this.oi_rows[paramBoxCE.row];
      int l = k + i - 1;
      int i1 = this.oi_columns[paramBoxCE.col];
      int i2 = i1 + j - 1;
      int i3 = localCellElement.getCellExpandAttr().getExtendable();
      if ((i3 == 0) || (i3 == 1))
      {
        i4 = 1;
        i5 = paramBoxCE.col;
        for (i6 = paramBoxCE.row + 1; i6 < this.oi_rows.length; ++i6)
          if (this.boxs2D[i6][i5] == paramBoxCE)
          {
            ++i4;
          }
          else
          {
            if (this.boxs2D[i6][i5] != null)
              break;
            if (this.oi_rows[i6] > l)
              break;
            if (this.oi_rows[i6] < k)
              break;
            this.boxs2D[i6][i5] = paramBoxCE;
            ++i4;
          }
        i = i4;
      }
      if ((i3 == 0) || (i3 == 2))
      {
        i4 = 1;
        i5 = paramBoxCE.row;
        for (i6 = paramBoxCE.col + 1; i6 < this.oi_columns.length; ++i6)
          if (this.boxs2D[i5][i6] == paramBoxCE)
          {
            ++i4;
          }
          else
          {
            if (this.boxs2D[i5][i6] != null)
              break;
            if (this.oi_columns[i6] > i2)
              break;
            if (this.oi_columns[i6] < i1)
              break;
            this.boxs2D[i5][i6] = paramBoxCE;
            ++i4;
          }
        j = i4;
      }
      paramBoxCE.colSpan = j;
      paramBoxCE.rowSpan = i;
      for (int i4 = 1; i4 < i; ++i4)
        for (i5 = 1; i5 < j; ++i5)
          this.boxs2D[(i4 + paramBoxCE.row)][(i5 + paramBoxCE.col)] = paramBoxCE;
      paramBoxCE.setStyle(localCellElement.getStyle());
      Object localObject1 = paramBoxCE.getValue();
      if (localObject1 instanceof ChartCollection)
      {
        localObject2 = (ChartCollection)localObject1;
        try
        {
          localObject2 = (ChartCollection)((ChartCollection)localObject1).clone();
        }
        catch (CloneNotSupportedException localCloneNotSupportedException1)
        {
        }
        localObject1 = SE.access$3500(this.this$0, paramBoxCE, (ChartCollection)localObject2);
        paramBoxCE.setValue(localObject1);
      }
      if (localCellElement instanceof AbstractCellElement)
      {
        localObject2 = ((AbstractCellElement)localCellElement).getOptionalAttributes();
        if (localObject2 != EM.EMPTY_ATTR)
          try
          {
            EM localEM = (EM)((EM)localObject2).lightClone();
            localObject4 = (Present)localEM.get(CellElementAttribute.PRESENT);
            if (localObject4 instanceof FormulaPresent)
            {
              for (localObject5 = ((FormulaPresent)localObject4).getFormulaContent(); ((String)localObject5).startsWith("="); localObject5 = ((String)localObject5).substring(1));
              localEM.put(CellElementAttribute.PRESENT, new FormulaPresent(this.this$0.calculator.exStatement(ColumnRow.valueOf(paramBoxCE.col, paramBoxCE.row), (String)localObject5)));
            }
            Object localObject5 = (NameJavaScriptGroup)localEM.get(CellElementAttribute.NAMEHYPERLINKGROUP);
            if (localObject5 != null)
              localEM.put(CellElementAttribute.NAMEHYPERLINKGROUP, ((NameJavaScriptGroup)localObject5).clone());
            if (!(paramBoolean1))
            {
              Widget localWidget = (Widget)localEM.get(CellElementAttribute.WIDGET);
              if (localWidget != null)
                localEM.put(CellElementAttribute.WIDGET, localWidget.clone());
            }
            paramBoxCE.setOptionalAttributes(localEM);
          }
          catch (CloneNotSupportedException localCloneNotSupportedException2)
          {
            localCloneNotSupportedException2.printStackTrace();
          }
      }
      if (paramBoxCE.getValue() instanceof Formula)
      {
        localObject2 = paramBoxCE.getBoxValueFormula();
        if (localObject2 instanceof Formula)
        {
          localObject3 = (Formula)localObject2;
          if ((((Formula)localObject3).isReserveInResult()) || ((paramBoolean2) && (((Formula)localObject3).isReserveOnWrite())))
            ((Formula)paramBoxCE.getValue()).setContent(this.this$0.calculator.exStatement(ColumnRow.valueOf(paramBoxCE.col, paramBoxCE.row), ((Formula)localObject3).getContent().substring(1)));
          else
            paramBoxCE.setValue(((Formula)paramBoxCE.getValue()).getResult());
        }
      }
      if (paramBoxCE.getWidget() instanceof FieldEditor)
      {
        localObject2 = (FieldEditor)paramBoxCE.getWidget();
        localObject3 = ((FieldEditor)localObject2).dependence();
        if ((localObject3 != null) && (localObject3.length > 0))
        {
          localObject4 = new HashMap();
          for (int i7 = 0; i7 < localObject3.length; ++i7)
            ((java.util.Map)localObject4).put(localObject3[i7], this.this$0.calculator.exStatement(ColumnRow.valueOf(paramBoxCE.col, paramBoxCE.row), (localObject3[i7].startsWith("$")) ? localObject3[i7].substring(1) : localObject3[i7]));
          paramBoxCE.setAttribute(CellElementAttribute.WIDGET_DEPENDENCE, localObject4);
        }
      }
    }

    private void postfix()
    {
      int i;
      HighlightGroup localHighlightGroup = paramBoxCE.be_from.get_ce_from().getHighlightGroup();
      if (localHighlightGroup != null)
      {
        this.this$0.calculator.setCurrentColumnRow(ColumnRow.valueOf(paramBoxCE.col, paramBoxCE.row));
        for (i = 0; i < localHighlightGroup.size(); ++i)
        {
          Highlight localHighlight = localHighlightGroup.getHighlight(i);
          if (localHighlight.eval(paramBoxCE, this.this$0.calculator))
            localHighlight.action(paramBoxCE, this.this$0.calculator);
        }
      }
    }

    private void writeObject()
      throws IOException
    {
      paramObjectOutputStream.writeObject(this.oi_rows);
      paramObjectOutputStream.writeObject(this.oi_columns);
      paramObjectOutputStream.writeObject(this.boxs2D);
    }

    private void readObject()
      throws IOException, ClassNotFoundException
    {
      this.oi_rows = ((int[])paramObjectInputStream.readObject());
      this.oi_columns = ((int[])paramObjectInputStream.readObject());
      this.boxs2D = ((SE.BoxCE[][])paramObjectInputStream.readObject());
    }

    public void releaseCache()
    {
    }

    public void toCache(, int paramInt2, boolean paramBoolean)
    {
    }

    static ResultReport access$100(Box2DCase paramBox2DCase, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
    {
      return paramBox2DCase.toReport(paramWorkSheet, paramBoolean1, paramBoolean2, paramBoolean3, paramBoolean4);
    }

    static void access$700(Box2DCase paramBox2DCase)
    {
      paramBox2DCase.insertRows(paramList);
    }

    static void access$800(Box2DCase paramBox2DCase)
    {
      paramBox2DCase.insertColumns(paramList);
    }

    static SE.BoxCE access$1000(Box2DCase paramBox2DCase, int paramInt1, int paramInt2)
    {
      return paramBox2DCase.__nail(paramBoxCE, paramInt1, paramInt2);
    }

    static SE.BoxCE access$1100(Box2DCase paramBox2DCase, int paramInt1, int paramInt2)
    {
      return paramBox2DCase.__nail(paramArrayOfBoxCE, paramInt1, paramInt2);
    }

    static SE.BoxCE access$2300(Box2DCase paramBox2DCase, int paramInt2)
    {
      return paramBox2DCase.getBox(paramInt1, paramInt2);
    }

    static int access$5300(Box2DCase paramBox2DCase, int[] paramArrayOfInt, int paramInt2)
    {
      return paramBox2DCase.insertRows(paramInt1, paramArrayOfInt, paramInt2);
    }

    static int access$5400(Box2DCase paramBox2DCase, int[] paramArrayOfInt)
    {
      return paramBox2DCase.insertColumns(paramInt, paramArrayOfInt);
    }

    private class RowIterator
      implements Iterator
    {
      private int rowIndex;
      int current_column;
      int next_column;
      com.fr.report.CellElement next;
      private final SE.Box2DCase this$1;

      public RowIterator(, int paramInt)
      {
        this.this$1 = paramBox2DCase;
        this.current_column = -1;
        this.next_column = 0;
        this.rowIndex = paramInt;
        findNext();
      }

      public boolean hasNext()
      {
        return (this.next != null);
      }

      public Object next()
      {
        if (!(hasNext()))
          throw new java.util.NoSuchElementException("At last element");
        com.fr.report.CellElement localCellElement = this.next;
        findNext();
        return localCellElement;
      }

      public void remove()
      {
        this.this$1.removeCell(this.current_column, this.rowIndex);
      }

      private void findNext()
      {
        SE.BoxCE localBoxCE;
        if ((this.rowIndex < 0) || (this.rowIndex >= this.this$1.boxs2D.length))
        {
          this.next = null;
          return;
        }
        do
        {
          if (this.next_column >= this.this$1.boxs2D[this.rowIndex].length)
            break label116;
          localBoxCE = this.this$1.boxs2D[this.rowIndex][this.next_column];
          this.current_column = this.next_column;
          this.next_column += 1;
        }
        while ((localBoxCE == null) || (localBoxCE.col != this.current_column) || (localBoxCE.row != this.rowIndex));
        this.next = localBoxCE;
        return;
        label116: this.next = null;
      }
    }

    private class ColumnIterator
      implements Iterator
    {
      private int columnIndex;
      private int current_row;
      private int next_row;
      private com.fr.report.CellElement next;
      private final SE.Box2DCase this$1;

      ColumnIterator(, int paramInt)
      {
        this.this$1 = paramBox2DCase;
        this.current_row = -1;
        this.next_row = 0;
        this.columnIndex = paramInt;
        findNext();
      }

      public boolean hasNext()
      {
        return (this.next != null);
      }

      public Object next()
      {
        if (!(hasNext()))
          throw new java.util.NoSuchElementException("At last element");
        com.fr.report.CellElement localCellElement = this.next;
        findNext();
        return localCellElement;
      }

      public void remove()
      {
        this.this$1.removeCell(this.columnIndex, this.current_row);
      }

      private void findNext()
      {
        SE.BoxCE localBoxCE;
        do
        {
          if (this.next_row >= this.this$1.boxs2D.length)
            break label83;
          localBoxCE = this.this$1.boxs2D[this.next_row][this.columnIndex];
          this.current_row = this.next_row;
          this.next_row += 1;
        }
        while ((localBoxCE == null) || (localBoxCE.col != this.columnIndex) || (localBoxCE.row != this.current_row));
        this.next = localBoxCE;
        return;
        label83: this.next = null;
      }
    }

    private class IntersectIterator
      implements Iterator
    {
      private int columnFrom;
      private int columnTo;
      private int rowFrom;
      private int rowTo;
      private int thisrow;
      private int thiscol;
      private int nextrow;
      private int nextcol;
      com.fr.report.CellElement next;
      private final SE.Box2DCase this$1;

      private IntersectIterator(, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
      {
        this.this$1 = paramBox2DCase;
        this.next = null;
        this.columnFrom = Math.max(paramInt1, 0);
        this.columnTo = Math.min(paramInt1 + paramInt3 - 1, paramBox2DCase.oi_columns.length - 1);
        this.rowFrom = Math.max(paramInt2, 0);
        this.rowTo = Math.min(paramInt2 + paramInt4 - 1, paramBox2DCase.oi_rows.length - 1);
        this.thisrow = -1;
        this.thiscol = -1;
        this.nextrow = this.rowFrom;
        this.nextcol = (this.columnFrom - 1);
        findNext();
      }

      public boolean hasNext()
      {
        return (this.next != null);
      }

      public Object next()
      {
        if (!(hasNext()))
          throw new java.util.NoSuchElementException("At last element");
        com.fr.report.CellElement localCellElement = this.next;
        this.thiscol = this.nextcol;
        this.thisrow = this.nextrow;
        findNext();
        return localCellElement;
      }

      public void remove()
      {
        this.this$1.removeCell(this.thiscol, this.thisrow);
      }

      private void findNext()
      {
        int i = this.nextcol + 1;
        for (int j = this.nextrow; j <= this.rowTo; ++j)
        {
          if (this.this$1.boxs2D.length <= j)
            break;
          while (i <= this.columnTo)
          {
            SE.BoxCE localBoxCE = this.this$1.boxs2D[j][i];
            if (localBoxCE == null)
              break label170:
            int k = Math.max(localBoxCE.col, this.columnFrom);
            int l = Math.max(localBoxCE.row, this.rowFrom);
            int i1 = Math.min(localBoxCE.col + localBoxCE.colSpan, this.columnTo + 1);
            int i2 = Math.min(localBoxCE.row + localBoxCE.rowSpan, this.rowTo + 1);
            if ((i1 > k) && (i2 > l) && (k == i) && (l == j))
            {
              this.nextrow = j;
              this.nextcol = i;
              this.next = localBoxCE;
              return;
            }
            ++i;
          }
          i = this.columnFrom;
        }
        label170: this.next = null;
      }

      IntersectIterator(, int paramInt1, int paramInt2, int paramInt3, int paramInt4, SE.1 param1)
      {
        this(paramBox2DCase, paramInt1, paramInt2, paramInt3, paramInt4);
      }
    }

    private class CellIterator
      implements Iterator
    {
      int thisrow;
      int thiscol;
      int nextrow;
      int nextcol;
      com.fr.report.CellElement next;
      private final SE.Box2DCase this$1;

      CellIterator()
      {
        this.this$1 = paramBox2DCase;
        this.thisrow = -1;
        this.thiscol = -1;
        this.nextrow = 0;
        this.nextcol = -1;
        this.next = null;
        findNext();
      }

      public boolean hasNext()
      {
        return (this.next != null);
      }

      public Object next()
      {
        if (!(hasNext()))
          throw new java.util.NoSuchElementException("At last element");
        com.fr.report.CellElement localCellElement = this.next;
        this.thiscol = this.nextcol;
        this.thisrow = this.nextrow;
        findNext();
        return localCellElement;
      }

      public void remove()
      {
        this.this$1.removeCell(this.thiscol, this.thisrow);
      }

      private void findNext()
      {
        int i = this.nextcol + 1;
        for (int j = this.nextrow; j < this.this$1.boxs2D.length; ++j)
        {
          while (i < this.this$1.boxs2D[j].length)
          {
            SE.BoxCE localBoxCE = this.this$1.boxs2D[j][i];
            if ((localBoxCE != null) && (localBoxCE.col == i) && (localBoxCE.row == j))
            {
              this.nextrow = j;
              this.nextcol = i;
              this.next = localBoxCE;
              return;
            }
            ++i;
          }
          i = 0;
        }
        this.next = null;
      }
    }
  }

  private static final class StaticCEList
  {
    SE.BoxCE[] ce_array;
    int column;
    int row;
    int gen_left;
    int gen_top;
    int gen_right;
    int gen_bottom;

    StaticCEList(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      this.column = paramInt1;
      this.row = paramInt2;
      this.gen_left = paramInt3;
      this.gen_right = paramInt5;
      this.gen_top = paramInt4;
      this.gen_bottom = paramInt6;
    }

    private void push_ce_array(SE.BoxCE[] paramArrayOfBoxCE)
    {
      if (this.ce_array == null)
      {
        this.ce_array = paramArrayOfBoxCE;
        return;
      }
      SE.BoxCE[] arrayOfBoxCE = this.ce_array;
      this.ce_array = new SE.BoxCE[arrayOfBoxCE.length + paramArrayOfBoxCE.length];
      System.arraycopy(arrayOfBoxCE, 0, this.ce_array, 0, arrayOfBoxCE.length);
      for (int i = 0; i < paramArrayOfBoxCE.length; ++i)
        this.ce_array[(i + arrayOfBoxCE.length)] = paramArrayOfBoxCE[i];
    }

    public String toString()
    {
      return this.ce_array.length + "*[" + this.column + "," + this.row + "]" + "★" + "[" + this.gen_left + "," + this.gen_top + "," + this.gen_right + "," + this.gen_bottom + "]";
    }

    static void access$600(StaticCEList paramStaticCEList, SE.BoxCE[] paramArrayOfBoxCE)
    {
      paramStaticCEList.push_ce_array(paramArrayOfBoxCE);
    }
  }

  private static final class BoxCE_Insert extends SE.BoxCE
  {
    private static final long serialVersionUID = 1L;

    BoxCE_Insert(Object paramObject, SE.BE paramBE)
    {
      super(paramObject, paramBE);
      setAttribute(CellElementAttribute.INSERT_NEW, new Object());
    }

    public Object getBoxValueFormula()
    {
      com.fr.report.CellElement localCellElement = this.be_from.get_ce_from();
      if ((localCellElement.getCellInsertPolicyAttr() != null) && (CellInsertPolicyAttr.INSERT_POLICY_DEFAULT.equals(localCellElement.getCellInsertPolicyAttr().getInsertPolicy())))
        return getValue();
      return localCellElement.getValue();
    }
  }

  private static final class BoxCE_Extend extends SE.BoxCE
  {
    private static final long serialVersionUID = 1L;
    transient int[] rows;

    BoxCE_Extend(int[] paramArrayOfInt, Object paramObject, SE.BE paramBE)
    {
      super(paramObject, paramBE);
      this.rows = paramArrayOfInt;
    }

    public int[] getRows()
    {
      return this.rows;
    }

    public String toString()
    {
      return "CE:" + SE.BEB.access$2400(this.be_from.beb) + "<" + hashCode() + ">";
    }
  }

  private static class BoxCE extends AbstractCellElement
    implements SE.PE
  {
    private static final long serialVersionUID = 1L;
    protected int col = -1;
    protected int row = -1;
    protected int colSpan = 1;
    protected int rowSpan = 1;
    transient SE.BE be_from;
    int result_index;

    BoxCE(Object paramObject, SE.BE paramBE)
    {
      this.value = paramObject;
      this.be_from = paramBE;
    }

    public SE.PE getLeftPE()
    {
      return this.be_from.getLeftPE();
    }

    public SE.PE getUpPE()
    {
      return this.be_from.getUpPE();
    }

    public ColumnRow getColumnRowFrom()
    {
      return this.be_from.getColumnRowFrom();
    }

    public BoxCE[] getResultBoxCE()
    {
      return new BoxCE[] { this };
    }

    public int getColumn()
    {
      return this.col;
    }

    public void setColumn(int paramInt)
    {
      this.col = paramInt;
    }

    public int getColumnSpan()
    {
      return this.colSpan;
    }

    public void setColumnSpan(int paramInt)
    {
      this.colSpan = paramInt;
    }

    public int getRow()
    {
      return this.row;
    }

    public void setRow(int paramInt)
    {
      this.row = paramInt;
    }

    public int getRowSpan()
    {
      return this.rowSpan;
    }

    public void setRowSpan(int paramInt)
    {
      this.rowSpan = paramInt;
    }

    private void mark_result_index(int paramInt)
    {
      this.result_index = paramInt;
    }

    private int get_result_index()
    {
      return this.result_index;
    }

    public Object getBoxValueFormula()
    {
      return this.be_from.get_ce_from().getValue();
    }

    static int access$1300(BoxCE paramBoxCE)
    {
      return paramBoxCE.get_result_index();
    }

    static void access$3100(BoxCE paramBoxCE, int paramInt)
    {
      paramBoxCE.mark_result_index(paramInt);
    }
  }

  private static class BE
    implements SE.PE, Cloneable
  {
    SE.PE left;
    SE.PE up;
    SE.BEB beb;
    String sourceDSName;
    TableData sourceTableData;
    SE.BoxCE[] ce_array;
    BE[] sons;

    BE(SE.PE paramPE1, SE.PE paramPE2)
    {
      this.left = paramPE1;
      this.up = paramPE2;
    }

    public SE.PE getLeftPE()
    {
      return this.left;
    }

    public SE.PE getUpPE()
    {
      return this.up;
    }

    public ColumnRow getColumnRowFrom()
    {
      return SE.BEB.access$2400(this.beb);
    }

    public SE.BoxCE[] getResultBoxCE()
    {
      return this.ce_array;
    }

    private void replace_son_be(BE paramBE, BE[] paramArrayOfBE)
    {
      for (int i = 0; i < this.sons.length; ++i)
        if (this.sons[i] == paramBE)
        {
          if (paramArrayOfBE.length == 1)
          {
            this.sons[i] = paramArrayOfBE[0];
          }
          else
          {
            BE[] arrayOfBE = this.sons;
            this.sons = new BE[arrayOfBE.length + paramArrayOfBE.length - 1];
            System.arraycopy(arrayOfBE, 0, this.sons, 0, i);
            System.arraycopy(paramArrayOfBE, 0, this.sons, i, paramArrayOfBE.length);
            System.arraycopy(arrayOfBE, i + 1, this.sons, i + paramArrayOfBE.length, arrayOfBE.length - i - 1);
          }
          return;
        }
    }

    private void posterity(java.util.Map paramMap1, int paramInt, java.util.Map paramMap2)
    {
      if (this.sons == null)
        return;
      for (int i = 0; i < this.sons.length; ++i)
        if (!(paramMap1.containsKey(this.sons[i])))
        {
          BE[] arrayOfBE = new BE[paramInt];
          if (paramInt > 0)
            arrayOfBE[0] = this.sons[i];
          for (int j = 1; j < paramInt; ++j)
            try
            {
              arrayOfBE[j] = ((BE)this.sons[i].clone());
            }
            catch (CloneNotSupportedException localCloneNotSupportedException)
            {
              FRContext.getLogger().log(Level.WARNING, localCloneNotSupportedException.getMessage(), localCloneNotSupportedException);
              arrayOfBE[j] = this.sons[i];
            }
          paramMap1.put(this.sons[i], arrayOfBE);
          com.fr.report.CellElement localCellElement = this.sons[i].get_ce_from();
          Object localObject = (List)paramMap2.get(localCellElement);
          if (localObject == null)
          {
            localObject = new ArrayList();
            paramMap2.put(localCellElement, localObject);
          }
          ((List)localObject).addAll(Arrays.asList(arrayOfBE));
          this.sons[i].posterity(paramMap1, paramInt, paramMap2);
        }
    }

    private int index_in_beb()
    {
      int i = 0;
      int j = this.beb.be_array.length;
      while (i < j)
      {
        if (this.beb.be_array[i] == this)
          return i;
        ++i;
      }
      return -1;
    }

    protected SE.BoxCE[] cc_ce_array(Calculator paramCalculator)
    {
      if (this.ce_array == null)
      {
        Set localSet = (Set)paramCalculator.getAttribute(SE.access$2500());
        if (localSet.contains(this))
          throw new DeathCycleException("Death cycle exists at calculating " + get_ce_from());
        localSet.add(this);
        LinkedList localLinkedList = (LinkedList)paramCalculator.getAttribute(SE.access$2600());
        localLinkedList.add(this);
        java.util.Map localMap = (java.util.Map)paramCalculator.getAttribute(SE.access$1800());
        Object localObject = get_ce_from().getValue();
        SE localSE = (SE)paramCalculator.getAttribute(SE.access$2700());
        if (localObject instanceof DSColumn)
          this.ce_array = SE.access$2800(localSE, this, (DSColumn)localObject);
        else if (localObject instanceof SubReport)
          this.ce_array = SE.access$2900(localSE, this, (SubReport)localObject);
        else
          this.ce_array = SE.access$3000(localSE, this, localObject);
        int i = get_ce_from().getCellExpandAttr().getMultipleNumber();
        if (i != -1)
        {
          ArrayList localArrayList = new ArrayList(this.ce_array.length);
          for (int k = 0; k < this.ce_array.length; ++k)
            localArrayList.add(this.ce_array[k]);
          for (k = this.ce_array.length % i; (k < i) && (k > 0); ++k)
            localArrayList.add(new SE.BoxCE_Extend(new int[0], Primitive.NULL, this));
          this.ce_array = ((SE.BoxCE[])localArrayList.toArray(new SE.BoxCE[localArrayList.size()]));
        }
        for (int j = 0; j < this.ce_array.length; ++j)
          SE.BoxCE.access$3100(this.ce_array[j], j + 1);
        localSet.remove(this);
        localLinkedList.removeLast();
        localMap.remove(this);
      }
      return this.ce_array;
    }

    protected void insert_more_ce(SE.BoxCE paramBoxCE)
    {
      if (paramBoxCE == null)
        return;
      if (this.ce_array == null)
      {
        this.ce_array = new SE.BoxCE[] { paramBoxCE };
      }
      else
      {
        SE.BoxCE[] arrayOfBoxCE = this.ce_array;
        this.ce_array = new SE.BoxCE[this.ce_array.length + 1];
        System.arraycopy(arrayOfBoxCE, 0, this.ce_array, 0, arrayOfBoxCE.length);
        this.ce_array[(this.ce_array.length - 1)] = paramBoxCE;
      }
      SE.BoxCE.access$3100(paramBoxCE, this.ce_array.length);
    }

    protected com.fr.report.CellElement get_ce_from()
    {
      return this.beb.ce_from;
    }

    public Object clone()
      throws CloneNotSupportedException
    {
      BE localBE = (BE)super.clone();
      if (this.sons != null)
        localBE.sons = new BE[this.sons.length];
      return localBE;
    }

    public String toString()
    {
      return "BE:" + SE.BEB.access$2400(this.beb) + "<" + super.hashCode() + ">";
    }

    static void access$400(BE paramBE, java.util.Map paramMap1, int paramInt, java.util.Map paramMap2)
    {
      paramBE.posterity(paramMap1, paramInt, paramMap2);
    }

    static void access$500(BE paramBE1, BE paramBE2, BE[] paramArrayOfBE)
    {
      paramBE1.replace_son_be(paramBE2, paramArrayOfBE);
    }

    static int access$1200(BE paramBE)
    {
      return paramBE.index_in_beb();
    }
  }

  public static abstract interface PE
  {
    public abstract PE getLeftPE();

    public abstract PE getUpPE();

    public abstract ColumnRow getColumnRowFrom();

    public abstract SE.BoxCE[] getResultBoxCE();
  }

  private static class BEB
  {
    SE.BE[] be_array;
    com.fr.report.CellElement ce_from;

    BEB(SE.BE[] paramArrayOfBE, com.fr.report.CellElement paramCellElement)
    {
      for (int i = 0; i < paramArrayOfBE.length; ++i)
        paramArrayOfBE[i].beb = this;
      set_be_array(paramArrayOfBE);
      this.ce_from = paramCellElement;
    }

    private void add_more_be(SE.BE paramBE)
    {
      if (paramBE == null)
        return;
      if (this.be_array == null)
      {
        this.be_array = new SE.BE[1];
      }
      else
      {
        SE.BE[] arrayOfBE = this.be_array;
        this.be_array = new SE.BE[arrayOfBE.length + 1];
        System.arraycopy(arrayOfBE, 0, this.be_array, 0, arrayOfBE.length);
      }
      this.be_array[(this.be_array.length - 1)] = paramBE;
      paramBE.beb = this;
    }

    private ColumnRow columnrow_from()
    {
      return ColumnRow.valueOf(this.ce_from.getColumn(), this.ce_from.getRow());
    }

    private SE.BE[] get_be_array()
    {
      return this.be_array;
    }

    private void set_be_array(SE.BE[] paramArrayOfBE)
    {
      this.be_array = paramArrayOfBE;
    }

    public String toString()
    {
      return "BEB[" + columnrow_from() + ":" + ((this.be_array == null) ? 0 : this.be_array.length) + "]";
    }

    static SE.BE[] access$200(BEB paramBEB)
    {
      return paramBEB.get_be_array();
    }

    static void access$300(BEB paramBEB, SE.BE[] paramArrayOfBE)
    {
      paramBEB.set_be_array(paramArrayOfBE);
    }

    static void access$900(BEB paramBEB, SE.BE paramBE)
    {
      paramBEB.add_more_be(paramBE);
    }

    static ColumnRow access$2400(BEB paramBEB)
    {
      return paramBEB.columnrow_from();
    }
  }

  private static final class ArraySerialComparator2
    implements Comparator
  {
    private Object[] obj_array;
    private boolean order;

    ArraySerialComparator2(Object[] paramArrayOfObject, boolean paramBoolean)
    {
      this.obj_array = paramArrayOfObject;
      this.order = paramBoolean;
    }

    public int compare(Object paramObject1, Object paramObject2)
    {
      int i = ((Integer)paramObject1).intValue();
      int j = ((Integer)paramObject2).intValue();
      int k = ComparatorUtils.compare(this.obj_array[i], this.obj_array[j]);
      return ((this.order) ? k : -k);
    }
  }

  private static final class ArraySerialComparator1
    implements Comparator
  {
    private ConditionalOrExpression[] con_array;
    private boolean[] order_array;
    private int[] rowIndices;
    private Calculator calculator;
    private SingleRowNameSpace ns;
    private Object[][] evaluated_results;

    ArraySerialComparator1(ConditionalOrExpression[] paramArrayOfConditionalOrExpression, boolean[] paramArrayOfBoolean, int[] paramArrayOfInt, Calculator paramCalculator, SingleRowNameSpace paramSingleRowNameSpace)
    {
      this.con_array = paramArrayOfConditionalOrExpression;
      this.order_array = paramArrayOfBoolean;
      this.rowIndices = paramArrayOfInt;
      this.calculator = paramCalculator;
      this.ns = paramSingleRowNameSpace;
      this.evaluated_results = new Object[paramArrayOfConditionalOrExpression.length][paramArrayOfInt.length];
    }

    public int compare(Object paramObject1, Object paramObject2)
    {
      int i = ((Integer)paramObject1).intValue();
      int j = ((Integer)paramObject2).intValue();
      int k = 0;
      for (int l = 0; l < this.evaluated_results.length; ++l)
      {
        Object localObject1 = cc_condition_result(l, i);
        Object localObject2 = cc_condition_result(l, j);
        k = ComparatorUtils.compare(localObject1, localObject2);
        if (k != 0)
        {
          k = (this.order_array[l] != 0) ? k : -k;
          break;
        }
      }
      return k;
    }

    private Object cc_condition_result(int paramInt1, int paramInt2)
    {
      Object localObject = this.evaluated_results[paramInt1][paramInt2];
      if (localObject == null)
      {
        int i = this.rowIndices[paramInt2];
        this.ns.setRowIndex(i);
        try
        {
          localObject = this.con_array[paramInt1].eval(this.calculator);
        }
        catch (UtilEvalError localUtilEvalError)
        {
          String str = "error happens at calculate formula\nformula expression is " + this.con_array[paramInt1] + "\nerror message is " + localUtilEvalError.getMessage();
          FRContext.getLogger().log(Level.WARNING, str, localUtilEvalError);
          localObject = Primitive.NULL;
        }
        this.evaluated_results[paramInt1][paramInt2] = localObject;
      }
      return localObject;
    }
  }

  private class SEDataSetFunction extends DataSetFunction
  {
    private final SE this$0;

    private SEDataSetFunction()
    {
      this.this$0 = paramSE;
    }

    public Object resolveFunction(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression, char paramChar)
    {
      Object localObject1;
      Object localObject3;
      Object localObject4;
      int k;
      if (paramArrayOfConditionalOrExpression.length == 0)
        return null;
      SE.BE localBE = SE.access$1400(this.this$0);
      Object[] arrayOfObject1 = resolveRelationTableData(paramString, localBE);
      paramString = (String)arrayOfObject1[0];
      TableData localTableData = (TableData)arrayOfObject1[1];
      try
      {
        if ((localTableData == null) || (localTableData.getColumnCount() == 0) || (localTableData.getRowCount() == 0))
          return null;
      }
      catch (TableDataException localTableDataException1)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException1.getMessage(), localTableDataException1);
        return null;
      }
      SE.PE localPE = SE.access$1500(this.this$0);
      if ((this.this$0.calculator.getCurrentRowsTableData() != null) && (localTableData == this.this$0.calculator.getCurrentRowsTableData().getTableData()))
        localObject1 = this.this$0.calculator.getCurrentRowsTableData().getRows();
      else if (localPE instanceof SE.BoxCE)
        localObject1 = SE.access$1600((SE.BoxCE)localPE, localTableData);
      else if (localPE == null)
        if (localTableData != null)
          try
          {
            localObject1 = IntList.range(localTableData.getRowCount());
          }
          catch (TableDataException localTableDataException2)
          {
            FRContext.getLogger().log(Level.WARNING, localTableDataException2.getMessage(), localTableDataException2);
            localObject1 = new int[0];
          }
        else
          localObject1 = new int[0];
      else
        localObject1 = SE.access$1700((SE.BE)localPE, localTableData);
      java.util.Map localMap = (java.util.Map)this.this$0.calculator.getAttribute(SE.access$1800());
      if (localBE != null)
      {
        localBE.sourceDSName = paramString;
        localBE.sourceTableData = localTableData;
        localMap.put(localBE, localObject1);
      }
      SingleRowNameSpace localSingleRowNameSpace = new SingleRowNameSpace(localTableData, -1, null);
      this.this$0.calculator.pushNameSpace(localSingleRowNameSpace);
      if (paramArrayOfConditionalOrExpression.length > 1)
      {
        localObject1 = fn_source_filter(paramArrayOfConditionalOrExpression[1], localObject1, localSingleRowNameSpace, this.this$0.calculator);
        if (localBE != null)
          localMap.put(localBE, localObject1);
        if (localObject1.length == 0)
          return null;
      }
      int i = 0;
      boolean bool = true;
      if (paramArrayOfConditionalOrExpression.length > 2)
      {
        try
        {
          bool = Boolean.TRUE.equals(paramArrayOfConditionalOrExpression[2].eval(this.this$0.calculator));
        }
        catch (UtilEvalError localUtilEvalError)
        {
          localObject3 = "error happens at calculate formula\nformula expression is " + paramArrayOfConditionalOrExpression[2] + "\nerror message is " + localUtilEvalError.getMessage();
          FRContext.getLogger().log(Level.WARNING, (String)localObject3, localUtilEvalError);
        }
        i = 1;
      }
      if (paramArrayOfConditionalOrExpression.length > 3)
      {
        localObject2 = new SE.ArraySerialComparator1(new ConditionalOrExpression[] { paramArrayOfConditionalOrExpression[3] }, new boolean[] { bool }, localObject1, this.this$0.calculator, localSingleRowNameSpace);
        localObject3 = new Integer[localObject1.length];
        for (int j = 0; j < localObject3.length; ++j)
          localObject3[j] = new Integer(j);
        Arrays.sort(localObject3, (Comparator)localObject2);
        localObject4 = new int[localObject1.length];
        for (k = 0; k < localObject1.length; ++k)
          localObject4[k] = localObject1[localObject3[k].intValue()];
        localObject1 = localObject4;
        i = 0;
      }
      Object localObject2 = fn_cc_ex_result(paramArrayOfConditionalOrExpression[0], localObject1, localTableData, localSingleRowNameSpace, this.this$0.calculator);
      this.this$0.calculator.removeNameSpace(localSingleRowNameSpace);
      if (i != 0)
      {
        localObject3 = new SE.ArraySerialComparator2(localObject2, bool);
        localObject4 = new Integer[localObject1.length];
        for (k = 0; k < localObject4.length; ++k)
          localObject4[k] = new Integer(k);
        Arrays.sort(localObject4, (Comparator)localObject3);
        int[] arrayOfInt = new int[localObject1.length];
        Object[] arrayOfObject2 = new Object[localObject1.length];
        for (int l = 0; l < localObject1.length; ++l)
        {
          arrayOfInt[l] = localObject1[localObject4[l].intValue()];
          arrayOfObject2[l] = localObject2[localObject4[l].intValue()];
        }
        localObject1 = arrayOfInt;
        localObject2 = arrayOfObject2;
      }
      if ('G' == paramChar)
        return SE.access$1900(localObject2, localObject1, localBE);
      return SE.access$2000(localObject2, localObject1, localBE);
    }

    public Object resolveXFunction(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression, char paramChar)
    {
      Object localObject1;
      if (paramArrayOfConditionalOrExpression.length == 0)
        return null;
      SE.BE localBE = SE.access$1400(this.this$0);
      Object[] arrayOfObject1 = resolveRelationTableData(paramString, localBE);
      paramString = (String)arrayOfObject1[0];
      TableData localTableData = (TableData)arrayOfObject1[1];
      try
      {
        if ((localTableData == null) || (localTableData.getColumnCount() == 0) || (localTableData.getRowCount() == 0))
          return null;
      }
      catch (TableDataException localTableDataException1)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException1.getMessage(), localTableDataException1);
        return null;
      }
      SE.PE localPE = SE.access$1500(this.this$0);
      if ((this.this$0.calculator.getCurrentRowsTableData() != null) && (localTableData == this.this$0.calculator.getCurrentRowsTableData().getTableData()))
        localObject1 = this.this$0.calculator.getCurrentRowsTableData().getRows();
      else if (localPE instanceof SE.BoxCE)
        localObject1 = SE.access$1600((SE.BoxCE)localPE, localTableData);
      else if (localPE == null)
        if (localTableData != null)
          try
          {
            localObject1 = IntList.range(localTableData.getRowCount());
          }
          catch (TableDataException localTableDataException2)
          {
            FRContext.getLogger().log(Level.WARNING, localTableDataException2.getMessage(), localTableDataException2);
            localObject1 = new int[0];
          }
        else
          localObject1 = new int[0];
      else
        localObject1 = SE.access$1700((SE.BE)localPE, localTableData);
      localBE.sourceDSName = paramString;
      localBE.sourceTableData = localTableData;
      java.util.Map localMap = (java.util.Map)this.this$0.calculator.getAttribute(SE.access$1800());
      localMap.put(localBE, localObject1);
      SingleRowNameSpace localSingleRowNameSpace = new SingleRowNameSpace(localTableData, -1, null);
      this.this$0.calculator.pushNameSpace(localSingleRowNameSpace);
      if (paramArrayOfConditionalOrExpression.length > 1)
      {
        localObject1 = fn_source_filter(paramArrayOfConditionalOrExpression[1], localObject1, localSingleRowNameSpace, this.this$0.calculator);
        localMap.put(localBE, localObject1);
        if (localObject1.length == 0)
          return null;
      }
      if (paramArrayOfConditionalOrExpression.length > 2)
      {
        int i = (paramArrayOfConditionalOrExpression.length - 1) / 2;
        ConditionalOrExpression[] arrayOfConditionalOrExpression = new ConditionalOrExpression[i];
        boolean[] arrayOfBoolean = new boolean[i];
        Arrays.fill(arrayOfBoolean, true);
        for (int j = 0; j < i; ++j)
        {
          arrayOfConditionalOrExpression[j] = paramArrayOfConditionalOrExpression[(j * 2 + 2)];
          if (j * 2 + 3 < paramArrayOfConditionalOrExpression.length)
          {
            localObject2 = paramArrayOfConditionalOrExpression[(j * 2 + 3)];
            try
            {
              arrayOfBoolean[j] = Boolean.TRUE.equals(((ConditionalOrExpression)localObject2).eval(this.this$0.calculator));
            }
            catch (UtilEvalError localUtilEvalError)
            {
              String str = "error happens at calculate formula\nformula expression is " + localObject2 + "\nerror message is " + localUtilEvalError.getMessage();
              FRContext.getLogger().log(Level.WARNING, str, localUtilEvalError);
            }
          }
        }
        SE.ArraySerialComparator1 localArraySerialComparator1 = new SE.ArraySerialComparator1(arrayOfConditionalOrExpression, arrayOfBoolean, localObject1, this.this$0.calculator, localSingleRowNameSpace);
        Object localObject2 = new Integer[localObject1.length];
        for (int k = 0; k < localObject2.length; ++k)
          localObject2[k] = new Integer(k);
        Arrays.sort(localObject2, localArraySerialComparator1);
        int[] arrayOfInt = new int[localObject1.length];
        for (int l = 0; l < localObject1.length; ++l)
          arrayOfInt[l] = localObject1[localObject2[l].intValue()];
        localObject1 = arrayOfInt;
      }
      Object[] arrayOfObject2 = fn_cc_ex_result(paramArrayOfConditionalOrExpression[0], localObject1, localTableData, localSingleRowNameSpace, this.this$0.calculator);
      this.this$0.calculator.removeNameSpace(localSingleRowNameSpace);
      if ('G' == paramChar)
        return SE.access$1900(arrayOfObject2, localObject1, localBE);
      return SE.access$2000(arrayOfObject2, localObject1, localBE);
    }

    public Object resolveColumnCount(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression)
    {
      TableData localTableData = this.this$0.__us_name2TableData(paramString);
      try
      {
        return new Integer(localTableData.getColumnCount());
      }
      catch (TableDataException localTableDataException)
      {
        FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
      }
      return new Integer(0);
    }

    public Object resolveColumnName(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression)
    {
      if ((paramArrayOfConditionalOrExpression.length == 0) || (paramArrayOfConditionalOrExpression[0] == null))
        return "";
      ConditionalOrExpression localConditionalOrExpression = paramArrayOfConditionalOrExpression[0];
      Object localObject = null;
      try
      {
        localObject = localConditionalOrExpression.eval(this.this$0.calculator);
      }
      catch (UtilEvalError localUtilEvalError)
      {
        String str2 = "error happens at calculate formula\nformula expression is " + localConditionalOrExpression + "\nerror message is " + localUtilEvalError.getMessage();
        FRContext.getLogger().log(Level.WARNING, str2, localUtilEvalError);
      }
      String str1 = null;
      if (localObject instanceof java.lang.Number)
      {
        int i = ((java.lang.Number)localObject).intValue() - 1;
        TableData localTableData = this.this$0.__us_name2TableData(paramString);
        try
        {
          str1 = localTableData.getColumnName(i);
        }
        catch (TableDataException localTableDataException)
        {
          FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
        }
      }
      if (str1 == null)
        str1 = localConditionalOrExpression.toString();
      return str1;
    }

    private Object[] resolveRelationTableData(, SE.BE paramBE)
    {
      Object[] arrayOfObject = this.this$0.dealwithDsName(paramString);
      paramString = (String)arrayOfObject[0];
      if (arrayOfObject[1] == null)
        arrayOfObject[1] = SE.access$2100(this.this$0, paramBE, paramString);
      if (arrayOfObject[1] == null)
        arrayOfObject[1] = this.this$0.__s_name2TableData(paramString);
      return arrayOfObject;
    }

    public Object resolveColumn(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression)
    {
      int[] arrayOfInt;
      if (paramArrayOfConditionalOrExpression.length < 1)
        return null;
      SE.BE localBE = SE.access$1400(this.this$0);
      Object[] arrayOfObject1 = resolveRelationTableData(paramString, localBE);
      paramString = (String)arrayOfObject1[0];
      TableData localTableData = (TableData)arrayOfObject1[1];
      int i = SE.access$2200(paramArrayOfConditionalOrExpression[0], localTableData, this.this$0.calculator);
      SE.PE localPE = SE.access$1500(this.this$0);
      if ((this.this$0.calculator.getCurrentRowsTableData() != null) && (localTableData == this.this$0.calculator.getCurrentRowsTableData().getTableData()))
        arrayOfInt = this.this$0.calculator.getCurrentRowsTableData().getRows();
      else if (localPE instanceof SE.BoxCE)
        arrayOfInt = SE.access$1600((SE.BoxCE)localPE, localTableData);
      else if (localPE == null)
        if (localTableData != null)
          try
          {
            arrayOfInt = IntList.range(localTableData.getRowCount());
          }
          catch (TableDataException localTableDataException)
          {
            FRContext.getLogger().log(Level.WARNING, localTableDataException.getMessage(), localTableDataException);
            arrayOfInt = new int[0];
          }
        else
          arrayOfInt = new int[0];
      else
        arrayOfInt = SE.access$1700((SE.BE)localPE, localTableData);
      localBE.sourceDSName = paramString;
      localBE.sourceTableData = localTableData;
      java.util.Map localMap = (java.util.Map)this.this$0.calculator.getAttribute(SE.access$1800());
      localMap.put(localBE, arrayOfInt);
      Object[] arrayOfObject2 = new Object[arrayOfInt.length];
      for (int j = 0; j < arrayOfObject2.length; ++j)
        arrayOfObject2[j] = DataUtils.getTableDataValue(localTableData, arrayOfInt[j], i);
      return SE.access$2000(arrayOfObject2, arrayOfInt, localBE);
    }

    public Object resolveValue(, ConditionalOrExpression[] paramArrayOfConditionalOrExpression)
    {
      if (paramArrayOfConditionalOrExpression.length < 2)
        return null;
      TableData localTableData = this.this$0.__us_name2TableData(paramString);
      ConditionalOrExpression localConditionalOrExpression1 = paramArrayOfConditionalOrExpression[0];
      ConditionalOrExpression localConditionalOrExpression2 = paramArrayOfConditionalOrExpression[1];
      int i = -2147483648;
      try
      {
        if (localConditionalOrExpression1 != null)
        {
          Object localObject = localConditionalOrExpression1.eval(this.this$0.calculator);
          if (localObject instanceof java.lang.Number)
            i = ((java.lang.Number)localObject).intValue() - 1;
        }
      }
      catch (UtilEvalError localUtilEvalError)
      {
        String str = "error happens at calculate formula\nformula expression is " + localConditionalOrExpression1 + "\nerror message is " + localUtilEvalError.getMessage();
        FRContext.getLogger().log(Level.WARNING, str, localUtilEvalError);
      }
      int j = SE.access$2200(localConditionalOrExpression2, localTableData, this.this$0.calculator);
      return DataUtils.getTableDataValue(localTableData, i, j);
    }

    SEDataSetFunction(, SE.1 param1)
    {
      this(paramSE);
    }
  }
}